用户名密码输入正确后,没有跳转登陆成功的字样,而是显示404
@RequestMapping(value="/subLogin",method=RequestMethod.POST)
@ResponseBody
public String subLogin(User user){
Subject subject=SecurityUtils.getSubject();
UsernamePasswordToken token=new UsernamePasswordToken(user.getUsername(),user.getPassword());
try {
subject.login(token);
} catch (Exception e) {
return e.getMessage();
}
return "登陆成功";
}