You can also use @RequestBody with MultiValueMap
e.g.
@RequestMapping(value="/create",
method=RequestMethod.POST,
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public String createRole(@RequestBody MultiValueMap<String, String> formData){
// your code goes here
}
Now you can get parameter names and their values.
MultiValueMap is in Spring utils package