Update Javadoc on exception resolvers in MVC config
Issue: SPR-15324
This commit is contained in:
@@ -167,19 +167,29 @@ public interface WebMvcConfigurer {
|
|||||||
void extendMessageConverters(List<HttpMessageConverter<?>> converters);
|
void extendMessageConverters(List<HttpMessageConverter<?>> converters);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure the {@link HandlerExceptionResolver}s to handle unresolved
|
* Configure exception resolvers.
|
||||||
* controller exceptions. If no resolvers are added to the list, default
|
* <p>The given list starts out empty. If it is left empty, the framework
|
||||||
* exception resolvers are added instead.
|
* configures a default set of resolvers, see
|
||||||
|
* {@link WebMvcConfigurationSupport#addDefaultHandlerExceptionResolvers(List)}.
|
||||||
|
* Or if any exception resolvers are added to the list, then the application
|
||||||
|
* effectively takes over and must provide, fully initialized, exception
|
||||||
|
* resolvers.
|
||||||
|
* <p>Alternatively you can use
|
||||||
|
* {@link #extendHandlerExceptionResolvers(List)} which allows you to extend
|
||||||
|
* or modify the list of exception resolvers configured by default.
|
||||||
* @param exceptionResolvers initially an empty list
|
* @param exceptionResolvers initially an empty list
|
||||||
|
* @see #extendHandlerExceptionResolvers(List)
|
||||||
|
* @see WebMvcConfigurationSupport#addDefaultHandlerExceptionResolvers(List)
|
||||||
*/
|
*/
|
||||||
void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers);
|
void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A hook for extending or modifying the list of {@link HandlerExceptionResolver}s
|
* Extending or modify the list of exception resolvers configured by default.
|
||||||
* after it has been configured. This may be useful for example to allow default
|
* This can be useful for inserting a custom exception resolver without
|
||||||
* resolvers to be registered and then insert a custom one through this method.
|
* interfering with default ones.
|
||||||
* @param exceptionResolvers the list of configured resolvers to extend
|
* @param exceptionResolvers the list of configured resolvers to extend
|
||||||
* @since 4.3
|
* @since 4.3
|
||||||
|
* @see WebMvcConfigurationSupport#addDefaultHandlerExceptionResolvers(List)
|
||||||
*/
|
*/
|
||||||
void extendHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers);
|
void extendHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user