For example, how to handle validation errors and possible exceptions in this controller action method:
@RequestMapping(method = POST) @ResponseBody public Fo
Throw an exception if you have an error, and then use @ExceptionHandler to annotate another method which will then handle the exception and render the appropriate response.