@RequestMapping(value = "/login.html", method = RequestMethod.POST) @ResponseBody public String login(String password, String email, HttpSession session, HttpServletRequest request) throws Exception { User user = userService.getUser(email); if (user == null) { return "wrong_email"; } }
这段代码返回值,按道理当user==null的时候返回的post结果是个String值,wrong_email,
但是,我console的结果却是登录页面,
我很不解,不知道不是说ResponseBody用的不当还是什么问题
时间: 2024-11-05 20:29:36