With this code
@RequestMapping(value = \"/bar/foo\", method = RequestMethod.GET)
public ResponseEntity foo() {
Foo model;
...
In my case, I was returning Boolean in Response Entity and had :
produces = MediaType.TEXT_PLAIN_VALUE,
When i changed it to below
produces = MediaType.APPLICATION_JSON_VALUE
It worked!
Example of what i had.
@PostMapping(value = "/xxx-xxxx",
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity yyyy(