MVC控制器,面临JSP
中的验证消息中的问题:
@RequestMapping(value = "/register", method = RequestMethod.POST)
public String registerSuccess(@Valid @ModelAttribute Registerbean register, Model model, Errors error) {
if (error.hasErrors()) {
return "Registration";
} else {
return "home";
}
}