Example #1
0
  @RequestMapping(value = "/login", method = RequestMethod.POST)
  String login() {
    System.out.println(request.getServletPath());
    boolean pass = checkAuth();
    if (pass) {
      userLoginIn();
    }
    String email = CurrentUtils.getParam("email");
    String password = CurrentUtils.getParam("password");
    System.out.println(email);
    System.out.println(password);
    log.debug("我的是debug");
    log.info("我的是info");
    log.warn("我的是warn");
    log.error("我的是error");

    return "index.html";
  }
Example #2
0
 /**
  * * 固定密码123
  *
  * @return
  */
 private boolean checkAuth() {
   return "123".equals(CurrentUtils.getSessoinAttribute("password"));
 }
Example #3
0
 /** 将当前登录用户放入session */
 private void userLoginIn() {
   User u = new User();
   u.setName((String) CurrentUtils.getParam("name"));
   CurrentUtils.setUser(u);
 }