只需使用名称与您的请求参数匹配的字段创建Pojo Java Bean。
然后使用此类作为您的请求处理程序方法的参数(不带任何其他注释)
public class Example { private String x; private Integer y; //Constructor without parameter needed! public Example(){} //Getter + Setter}@Controller@RequestMapping("someUrl")public class SomeController { @RequestMapping public String someHandler (Example example) { System.out.println(example.getX()); return "redirect:someOtherUrl"; }}


