Class ResponseStatusExceptionResolver

java.lang.Object
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver
All Implemented Interfaces:
Aware, MessageSourceAware, Ordered, HandlerExceptionResolver

public class ResponseStatusExceptionResolver extends AbstractHandlerExceptionResolver implements MessageSourceAware
A HandlerExceptionResolver that uses the @ResponseStatus annotation to map exceptions to HTTP status codes.

This exception resolver is enabled by default in the DispatcherServlet and the MVC Java config and the MVC namespace.

As of 4.2 this resolver also looks recursively for @ResponseStatus present on cause exceptions, and as of 4.2.2 this resolver supports attribute overrides for @ResponseStatus in custom composed annotations.

As of 5.0 this resolver also supports ResponseStatusException.

Since:
3.0
Author:
Arjen Poutsma, Rossen Stoyanchev, Sam Brannen
See Also: