d71a4cc8b152543d8be2f2810f1ee957b7924696.svn-base 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package com.yihu.jkedu.action;
  2. import java.io.PrintWriter;
  3. import java.io.StringWriter;
  4. import java.util.HashMap;
  5. import java.util.Map;
  6. import javax.servlet.http.HttpServletRequest;
  7. import javax.servlet.http.HttpServletResponse;
  8. import net.sf.json.JSONObject;
  9. import org.springframework.stereotype.Controller;
  10. import org.springframework.web.bind.annotation.RequestMapping;
  11. import com.coreframework.util.AppConfig;
  12. import com.yihu.main.ServerConsole;
  13. import com.yihu.utils.BaseFunction;
  14. import com.yihu.utils.OPUtil;
  15. import com.yihu.utils.StringUtil;
  16. import com.yihu.utils.Utils;
  17. @Controller
  18. @RequestMapping("/appLogin")
  19. public class AppLoginControl{
  20. @RequestMapping(value="/login")
  21. public void loginUser(HttpServletRequest request,
  22. HttpServletResponse response)throws Exception{
  23. try {
  24. StringUtil.write(response,StringUtil.jsonResult(1, "success").toString());
  25. } catch (Exception e) {
  26. StringWriter sw = new StringWriter();
  27. PrintWriter w = new PrintWriter(sw);
  28. e.printStackTrace(w);
  29. StringUtil.write(response,StringUtil.jsonResult(-1, "登录异常").toString());
  30. return;
  31. }
  32. }
  33. }