Skip to content

Commit

Permalink
Update WebMvcConfigurer#addInterceptors javadoc
Browse files Browse the repository at this point in the history
spring-projectsgh-20583 updated resourceHandlerMapping to use shared interceptors.
addInterceptors in WebMvcConfigurer now adds interceptors for static
resources as well.
Closes spring-projectsgh-23908
  • Loading branch information
Samarth Rastogi committed Nov 4, 2019
1 parent 8855056 commit c088cbc
Showing 1 changed file with 2 additions and 9 deletions.
Expand Up @@ -90,15 +90,8 @@ default void addFormatters(FormatterRegistry registry) {

/**
* Add Spring MVC lifecycle interceptors for pre- and post-processing of
* controller method invocations. Interceptors can be registered to apply
* to all requests or be limited to a subset of URL patterns.
* <p><strong>Note</strong> that interceptors registered here only apply to
* controllers and not to resource handler requests. To intercept requests for
* static resources either declare a
* {@link org.springframework.web.servlet.handler.MappedInterceptor MappedInterceptor}
* bean or switch to advanced configuration mode by extending
* {@link org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
* WebMvcConfigurationSupport} and then override {@code resourceHandlerMapping}.
* controller method invocations and resource handler requests. Interceptors can be registered
* to apply to all requests or be limited to a subset of URL patterns.
*/
default void addInterceptors(InterceptorRegistry registry) {
}
Expand Down

0 comments on commit c088cbc

Please sign in to comment.