您使用了错误的注释。
@RequestAttribute用于检索
HttpServletRequestusing
上设置的属性
setAttribute。但是,您希望将请求参数绑定到对象,因此应
@ModelAttribute改为使用注释。
@RequestMapping("/hello")public ModelAndView helloWorld(@ModelAttribute("info") Information userInfo) { ... }更改注释将使其起作用。

您使用了错误的注释。
@RequestAttribute用于检索
HttpServletRequestusing
setAttribute。但是,您希望将请求参数绑定到对象,因此应
@ModelAttribute改为使用注释。
@RequestMapping("/hello")public ModelAndView helloWorld(@ModelAttribute("info") Information userInfo) { ... }更改注释将使其起作用。