I have the following method in my Spring MVC @Controller :
@RequestMapping(method = RequestMethod.GET)
public String testUrl(@RequestParam(value=\"test\") Ma
Spring doesn't have default conversion strategy from multiple parameters with the same name to HashMap. It can, however, convert them easily to List, array or Set.
@RequestMapping(value = "/testset", method = RequestMethod.GET)
public String testSet(@RequestParam(value = "test") Set test) {
return "success";
}
I tested with postman like http://localhost:8080/mappings/testset?test=ABC&test=DEF
You will see set having data, [ABC, DEF]