我可以使用值“home”来请求映射
@RequestMapping(value = "home", method = RequestMethod.POST)
public String showHomePage(
@ModelAttribute("loginForm") LoginBean object,
ModelMap model,
BindingResult result) {
model.addAttribute("name", name);
return "home";
}
和
@RequestMapping(value = "home", method = RequestMethod.GET)
public String showHomePage1(
@ModelAttribute("loginForm") LoginBean object,
ModelMap model,
BindingResult result) {
model.addAttribute("name", name);
return "home";
}
但是当我刷新页面时,它会生成一个参数类型未匹配的错误