@RequestMapping(value = "/signin", method = RequestMethod.POST)
@ResponseBody
public String signin(String code, String password, ModelMap model){
String message = "";
User user = new User();
if(!code.equalsIgnoreCase("000001"))
message = "code:å¸å·ä¸åå¨";
else if(!password.equalsIgnoreCase("123"))
message = "password:å¯ç é误";
else{
model.addAttribute(Constants.SESSION_USER, user);
message = "redirect:index.html";
}
return message;
}
温馨提示:答案为网友推荐,仅供参考