AbstractHandlerMethodExceptionResolver that resolves exceptions
through @ExceptionHandler methods.
Support for custom argument and return value types can be added via
setCustomArgumentResolvers and setCustomReturnValueHandlers.
Or alternatively to re-configure all argument and return value types use
setArgumentResolvers and setReturnValueHandlers(List).
| Modifier and Type | Field and Description |
|---|---|
| private ApplicationContext | |
| private HandlerMethodArgumentResolverComposite | |
| private ContentNegotiationManager | |
| private List | |
| private List | |
| private static final String | DISCONNECTED_CLIENT_LOG_CATEGORY
Log category to use for network failure after a client has gone away. |
| private static final DisconnectedClientHelper | |
| private final Map | |
| private final Map | |
| private final List | |
| private final List | |
| private HandlerMethodReturnValueHandlerComposite |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| protected ModelAndView | doResolveHandlerMethodException(HttpServletRequest
current HTTP request request, HttpServletResponse current HTTP response response, HandlerMethod the executed handler method, or handlerMethod, Exception null if none chosen at the time
of the exception (for example, if multipart resolution failed)the exception that got thrown during handler execution exception)Implements abstract org. Find an |
| public ApplicationContext | |
| public HandlerMethodArgumentResolverComposite | getArgumentResolvers()
Return the configured argument resolvers, or possibly |
| public ContentNegotiationManager | |
| public List | |
| public List | |
| protected List | getDefaultArgumentResolvers()
Return the list of argument resolvers to use including built-in resolvers
and custom resolvers provided via |
| protected List | getDefaultReturnValueHandlers()
Return the list of return value handlers to use including built-in and
custom handlers provided via |
| public Map | getExceptionHandlerAdviceCache()
Return an unmodifiable Map with the |
| protected ServletInvocableHandlerMethod | Returns: a method to handle the exception, ornull if nonethe method where the exception was raised (may be handlerMethod, Exception null)the raised exception exception)Find an |
| public List | |
| public HandlerMethodReturnValueHandlerComposite | getReturnValueHandlers()
Return the configured handlers, or possibly |
| protected boolean | hasGlobalExceptionHandlers()
Whether this resolver has global exception handlers, e.g. not declared in
the same class as the |
| private void | |
| private void | |
| public void | setApplicationContext(ApplicationContext
the ApplicationContext object to be used by this object applicationContext)Implements org. Set the ApplicationContext that this object runs in. Normally this call will be used to initialize the object. |
| public void | setArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)
Configure the complete list of supported argument types thus overriding the resolvers that would otherwise be configured by default. |
| public void | setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager)
Set the |
| public void | setCustomArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)
Provide resolvers for custom argument types. |
| public void | setCustomReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Provide handlers for custom return value types. |
| public void | setMessageConverters(List<HttpMessageConverter<?>> messageConverters)
Set the message body converters to use. |
| public void | setResponseBodyAdvice(List<ResponseBodyAdvice<?>> responseBodyAdvice)
Add one or more components to be invoked after the execution of a controller
method annotated with |
| public void | setReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Configure the complete list of supported return value types thus overriding handlers that would otherwise be configured by default. |
| protected boolean | shouldApplyTo(HttpServletRequest
current HTTP request request, Object the executed handler, or handler)null if none chosen
at the time of the exception (for example, if multipart resolution failed)Overrides org. Checks if the handler is a |
| applicationContext | back to summary |
|---|---|
| private ApplicationContext applicationContext
| |
| argumentResolvers | back to summary |
|---|---|
| private HandlerMethodArgumentResolverComposite argumentResolvers
| |
| contentNegotiationManager | back to summary |
|---|---|
| private ContentNegotiationManager contentNegotiationManager | |
| customArgumentResolvers | back to summary |
|---|---|
| private List<HandlerMethodArgumentResolver> customArgumentResolvers
| |
| customReturnValueHandlers | back to summary |
|---|---|
| private List<HandlerMethodReturnValueHandler> customReturnValueHandlers
| |
| DISCONNECTED_CLIENT_LOG_CATEGORY | back to summary |
|---|---|
| private static final String DISCONNECTED_CLIENT_LOG_CATEGORY Log category to use for network failure after a client has gone away.
| |
| disconnectedClientHelper | back to summary |
|---|---|
| private static final DisconnectedClientHelper disconnectedClientHelper | |
| exceptionHandlerAdviceCache | back to summary |
|---|---|
| private final Map<ControllerAdviceBean, ExceptionHandlerMethodResolver> exceptionHandlerAdviceCache | |
| exceptionHandlerCache | back to summary |
|---|---|
| private final Map<Class<?>, ExceptionHandlerMethodResolver> exceptionHandlerCache | |
| messageConverters | back to summary |
|---|---|
| private final List<HttpMessageConverter<?>> messageConverters | |
| responseBodyAdvice | back to summary |
|---|---|
| private final List<Object> responseBodyAdvice | |
| returnValueHandlers | back to summary |
|---|---|
| private HandlerMethodReturnValueHandlerComposite returnValueHandlers
| |
| ExceptionHandlerExceptionResolver | back to summary |
|---|---|
| public ExceptionHandlerExceptionResolver() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| doResolveHandlerMethodException | back to summary |
|---|---|
| protected ModelAndView doResolveHandlerMethodException(HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod, Exception exception) Implements abstract org. Find an
| |
| getApplicationContext | back to summary |
|---|---|
public ApplicationContext getApplicationContext()
| |
| getArgumentResolvers | back to summary |
|---|---|
| public HandlerMethodArgumentResolverComposite getArgumentResolvers() Return the configured argument resolvers, or possibly
| |
| getContentNegotiationManager | back to summary |
|---|---|
| public ContentNegotiationManager getContentNegotiationManager() Return the configured | |
| getCustomArgumentResolvers | back to summary |
|---|---|
| public List Return the custom argument resolvers, or
| |
| getCustomReturnValueHandlers | back to summary |
|---|---|
| public List Return the custom return value handlers, or
| |
| getDefaultArgumentResolvers | back to summary |
|---|---|
| protected List Return the list of argument resolvers to use including built-in resolvers
and custom resolvers provided via | |
| getDefaultReturnValueHandlers | back to summary |
|---|---|
| protected List Return the list of return value handlers to use including built-in and
custom handlers provided via | |
| getExceptionHandlerAdviceCache | back to summary |
|---|---|
| public Map Return an unmodifiable Map with the | |
| getExceptionHandlerMethod | back to summary |
|---|---|
| protected ServletInvocableHandlerMethod getExceptionHandlerMethod(HandlerMethod handlerMethod, Exception exception) Find an
| |
| getMessageConverters | back to summary |
|---|---|
| public List Return the configured message body converters. | |
| getReturnValueHandlers | back to summary |
|---|---|
| public HandlerMethodReturnValueHandlerComposite getReturnValueHandlers() Return the configured handlers, or possibly
| |
| hasGlobalExceptionHandlers | back to summary |
|---|---|
| protected boolean hasGlobalExceptionHandlers() Whether this resolver has global exception handlers, e.g. not declared in
the same class as the
| |
| initExceptionHandlerAdviceCache | back to summary |
|---|---|
| private void initExceptionHandlerAdviceCache() | |
| initMessageConverters | back to summary |
|---|---|
| private void initMessageConverters() | |
| setApplicationContext | back to summary |
|---|---|
| public void setApplicationContext(ApplicationContext applicationContext) Implements org. Doc from org. Set the ApplicationContext that this object runs in. Normally this call will be used to initialize the object. Invoked after population of normal bean properties but before an init callback such
as
| |
| setArgumentResolvers | back to summary |
|---|---|
| public void setArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) Configure the complete list of supported argument types thus overriding the resolvers that would otherwise be configured by default. | |
| setContentNegotiationManager | back to summary |
|---|---|
| public void setContentNegotiationManager(ContentNegotiationManager contentNegotiationManager) Set the | |
| setCustomArgumentResolvers | back to summary |
|---|---|
| public void setCustomArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) Provide resolvers for custom argument types. Custom resolvers are ordered
after built-in ones. To override the built-in support for argument
resolution use | |
| setCustomReturnValueHandlers | back to summary |
|---|---|
| public void setCustomReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) Provide handlers for custom return value types. Custom handlers are
ordered after built-in ones. To override the built-in support for
return value handling use | |
| setMessageConverters | back to summary |
|---|---|
| public void setMessageConverters(List<HttpMessageConverter<?>> messageConverters) Set the message body converters to use. These converters are used to convert from and to HTTP requests and responses. | |
| setResponseBodyAdvice | back to summary |
|---|---|
| public void setResponseBodyAdvice(List<ResponseBodyAdvice<?>> responseBodyAdvice) Add one or more components to be invoked after the execution of a controller
method annotated with | |
| setReturnValueHandlers | back to summary |
|---|---|
| public void setReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) Configure the complete list of supported return value types thus overriding handlers that would otherwise be configured by default. | |
| shouldApplyTo | back to summary |
|---|---|
| protected boolean shouldApplyTo(HttpServletRequest request, Object handler) Overrides org. Doc from org. Checks if the handler is a
| |