Web-service using spring in which I have to get the params from the body of my post request? The content of the body is like:-
source=”mysource”
&json=
You can try using @RequestBodyParam
@RequestMapping(value = "/saveData", headers="Content-Type=application/json", method = RequestMethod.POST)
@ResponseBody
public ResponseEntity saveData(@RequestBodyParam String source,@RequestBodyParam JsonDto json) throws MyException {
...
}
https://github.com/LambdaExpression/RequestBodyParam