package com.yihu.jkedu; import java.io.PrintWriter; import java.io.StringWriter; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.json.JSONObject; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.coreframework.util.AppConfig; import com.yihu.main.ServerConsole; import com.yihu.utils.BaseFunction; import com.yihu.utils.OPUtil; import com.yihu.utils.StringUtil; import com.yihu.utils.Utils; @Controller @RequestMapping("/appLogin") public class CopyOfAppLoginControl{ @RequestMapping(value="/login") public void loginUser(HttpServletRequest request, HttpServletResponse response)throws Exception{ try { StringUtil.write(response,StringUtil.jsonResult(1, "success").toString()); } catch (Exception e) { StringWriter sw = new StringWriter(); PrintWriter w = new PrintWriter(sw); e.printStackTrace(w); StringUtil.write(response,StringUtil.jsonResult(-1, "登录异常").toString()); return; } } }