spring-mvcGlobal Exception Handling


Remarks

  1. Don't forget to create custom exceptions if you have to
  2. Both the resolver and handler must be beens discovered by Spring
  3. If you are on Spring 3.2 or higher, you can use @ContrllerAdvice

Source