How to respond with HTTP 400 error in a Spring MVC @ResponseBody method returning String? How to respond with HTTP 400 error in a Spring MVC @ResponseBody method returning String? java java