Professional Documents
Culture Documents
Exception Resolver
Exception Resolver
HandlerExceptionResolver
If any exception is raise then spring framework check, for the corresponding
exception is there any HandlerExceptionResolver in ApplicationContext or not.If not
then it simply returns the same exception back to the client.
2.The HandlerExceptionResolver
==============================
JaxRs:ExceptionMapper
Exception handle at Application level.
1. ExceptionHandlerExceptionResolver
=======================================
Spring 3.1 similar to @ExceptionHandler
2. DefaultHandlerExceptionResolver
==================================
Spring 3.0: Map Spring Exception to its corresponding HTTP Status code
It doesn't write any information on Response object.So here programmer take the
responsiblility to create a ModelAndView object and render information on the View.
3. ResponseStatusExceptionResolver
==================================
The exception classes which we create for our application, can be annotated with
@ResponseStatus. In that case an unhandled exception returned to the client will
have the specified HTTP status code.
4. SimpleMappingExceptionResolver
=================================
Maps Exception class names to view names. Old way to handle Exception.
5. AnnotationMethodHandlerExceptionResolver
============================================
Handle Exception through @ExceptionHandler.
6. Custom HandlerExceptionResolver
=======================================