title: MVC Java Config - HandlerInterceptor not excluding paths
body: <p>I have a MVC Java configuration but the <code>HandlerInterceptor</code> is not excluding some patterns.</p>
  
  <p>At the line marked with <strong>xxx</strong>, if </p>
  
  <p>1) I add both <code>addPatterns("/**")</code> and <code>excludePathPatterns("*.ecxld")</code> to the <code>HandlerInterceptor</code>'s <code>InterceptorRegistration</code>, the <code>HandlerInterceptor.preHanlde()</code> is NOT invoked at all. e.g <code>.addPathPatterns("/**").excludePathPatterns("*.ecxld")</code></p>
  
  <p>2) I add only <code>excludePathPatterns("*.ecxld")</code> to the <code>HandlerInterceptor</code>'s <code>InterceptorRegistration</code>, the <code>HandlerInterceptor.preHanlde()</code> is still executed.</p>
  
  <p>(the other interceptors are invoked fine).</p>
  
  <p>Any pointers appreciated. </p>
  
  <p>Thanks</p>
  
  <pre><code>@Configuration
  public class MyMVCConfigurerAdapter extends WebMvcConfigurerAdapter {
  
   @Override
   public void addInterceptors(final InterceptorRegistry registry) {
  
       registry.addInterceptor(getInterceptorOne());
  
       registry.addInterceptor(getMyHandlerInterceptor())
                   .excludePathPatterns("*.ecxld");  // **xxx**
  
       registry.addInterceptor(getInterceptorTwo()
       );
  
   }
  </code></pre>