I have a controller like below
@Controller(\"myController\") @RequestMapping(\"api\") public class MyController { @RequestMapping(method = RequestMetho
You need to change the type of the output value ResponseEntity. Answer here: How to respond with HTTP 400 error in a Spring MVC @ResponseBody method returning String?