Custom Exception Resolver
Learn Custom Exception Resolver (Advanced Spring MVC, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes HandlerExceptionResolver turns an exception thrown during a request into a response; the method is ModelAndView resolveException(request, response, handler, ex) . Return value : an empty ModelAndView means "handled, response written"; null means "not mine, ask the next resolver". Built-in chain : ExceptionHandlerExceptionResolver ( @ExceptionHandler ), ResponseStatusExceptionResolver and DefaultHandlerExceptionResolver .
More lessons in Advanced Spring MVC
- Custom HandlerMapping
- Custom HandlerAdapter
- Custom ViewResolver
- Custom Argument Resolver
- HandlerMethodArgumentResolver
- Custom Return Value Handler
- HandlerMethodReturnValueHandler
- Custom Formatter
- Custom Converter
- Custom Interceptor
- Custom Message Converter
- Custom Annotation
- Request Lifecycle Customization
- Mini Project: Asynchronous Requests: Callable, DeferredResult and Server-Sent Events