O'Reilly logo

Spring: Developing Java Applications for the Enterprise by Ravi Kant Soni, Rajesh RV, Amuthan Ganeshan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with HandlerExceptionResolver

Spring MVC provides several approaches to exception handling. In Spring, one of the main exception handling constructs is the HandlerExceptionResolver (org.springframework.web.servlet.HandlerExceptionResolver) interface. Any objects that implement this interface can resolve exceptions thrown during Controller mapping or execution. HandlerExceptionResolver implementers are typically registered as beans in the web application context.

Spring MVC creates two such HandlerExceptionResolver implementations by default to facilitate exception handling:

  • ResponseStatusExceptionResolver is created to support the @ResponseStatus annotation
  • ExceptionHandlerExceptionResolver is created to support the @ExceptionHandler annotation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required