Controller signature (I have tried as requestbody as well) :
@RequestMapping(value = "/Lame", method = RequestMethod.POST)
public
@ResponseBody
boolean getLame(@RequestParam String strToMatchA, @RequestParam String strToMatchB) {}
And this as my json :
{
"strToMatchA": "EN",
"strToMatchB": "lon"
}
Not working, I receive the error :
org.springframework.web.bind.MissingServletRequestParameterException: Required String parameter 'strToMatchA' is not present
Removing this first parameter from method signature then makes it work (the method gets called correctly), what should I be doing ?
When I change method parameters to be annotated with @RequestBody I get the following error :
java.io.IOException: Stream closed
GETinstead ofPOST.