Skip to main content

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