我也遇到了这个问题,我的解决方案也有所不同,因此为有类似问题的任何人添加此内容。
我的控制器有:
@RequestMapping(value = "/setPassword", method = RequestMethod.POST)public String setPassword(Model model, @RequestParameter SetPassword setPassword) { ...}问题在于,这应该是 @ModelAttribute
针对对象的,而不是
@RequestParameter。此错误消息与您在问题中描述的相同。
@RequestMapping(value = "/setPassword", method = RequestMethod.POST)public String setPassword(Model model, @ModelAttribute SetPassword setPassword) { ...}


