title: Spring MVC handler interceptor with exclude path pattern with pathparam
body: <p>I have written an HandlerInterceptorAdapter implementation and would like to exclude the path patterns that authenticate the user and refresh the user while registering token, the URLS of thje resource mostly has the email address as a path param, which of the below code snippet is a valid form to do so</p>
  
  <pre><code> @Override
      public void addInterceptors(InterceptorRegistry registry) {
          super.addInterceptors(registry);
          registry.addInterceptor(new AuthorizationInterceptor()).excludePathPatterns("/somepath/*/someresource/*");
      }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>@Override
  public void addInterceptors(InterceptorRegistry registry) {
      super.addInterceptors(registry);
  
      registry.addInterceptor(new AuthorizationInterceptor()).excludePathPatterns("/somepath/{email}/someresource/*");
  }
  </code></pre>
  
  <p>EDIT:::</p>
  
  <p>Enhanced the code using the PatternMatcher, still not working</p>
  
  <pre><code> @Override
      public void addInterceptors(InterceptorRegistry registry) {
          super.addInterceptors(registry);
  
          registry.addInterceptor(new AuthorizationInterceptor())
                  .excludePathPatterns(
                          "/somepath",
                          "/somepath/*/authenticate",
                          "somapath/*/someresource/verify"
                  ).pathMatcher(new AntPathMatcher());
      }
  </code></pre>