title: Spring InterceptorRegistry - allow Swagger / Actuator
body: <p>I want to intercept requests in my Spring Boot app which I have configured below. But I don't want to intercept requests from Swagger / Actuator. I know I can use excludePathPatterns but I don't want to use that as I don't want to maintain a list of exclusions. Can anyone tell me why addPathPatterns isn't sufficient?</p>
  <pre><code>@Override
  public void addInterceptors(InterceptorRegistry registry) {
      registry.addInterceptor(requestInterceptor)
              .addPathPatterns(&quot;/endpoint1&quot;, &quot;/endpoint2&quot;);
  }
  </code></pre>