Map GET parameters to Object in Spring
It's possbile to map GET parameters to an object in Spring. It's really useful when we need to pass lots of parameters as query string e.g. submitting a search form with many parameters. The following controller demonstrates this. @RestController @RequestMapping("hello") public class MyController { @RequestMapping(value = "data", method = RequestMethod.GET) public MyRequest getData(MyRequest request){ return request; } public static class MyRequest { private String name; private int age; public String getName(){return this.name;} public int getAge(){return this.name;} public void setName(String name){this.name=name;} public void setAge(int age){this.age=ag...