protected void registerTenantInterceptorWithIgnorePathPattern ( InterceptorRegistry registry , HandlerInterceptor interceptor ) { InterceptorRegistration tenantInterceptorRegistration = registry . addInterceptor ( interceptor ) ; tenantInterceptorRegistration . addPathPatterns ( "/**" ) ; List < String > tenantIgnorePathPatterns = getTenantIgnorePathPatterns ( ) ; Objects . requireNonNull ( tenantIgnorePathPatterns , "tenantIgnorePathPatterns can't be null" ) ; for ( String pattern : tenantIgnorePathPatterns ) { tenantInterceptorRegistration . excludePathPatterns ( pattern ) ; } LOGGER . info ( "Added handler interceptor '{}' to all urls, exclude {}" , interceptor . getClass ( ) . getSimpleName ( ) , tenantIgnorePathPatterns ) ; }
Registered interceptor to all request except passed urls .