title: Spring Security Filter not honering URL patterns
body: <p>I've set up some security filters in my Spring Boot application and I have defined specific URL patterns I want </p>
  
  <pre class="lang-java prettyprint-override"><code>@Bean
  public FilterRegistrationBean&lt;CustomAuthenticationFilter&gt; authenticationFilter(){
  
    FilterRegistrationBean&lt;CustomAuthenticationFilter&gt; registrationBean = new FilterRegistrationBean&lt;&gt;();
  
    registrationBean.setFilter(new CustomAuthenticationFilter());
    registrationBean.addUrlPatterns("/data/*", "/record/*","/records/*","/storage/*","/query/*");
  
    return registrationBean;
  }
  </code></pre>
  
  <p>I'm adding the filter into the WebConfig like so</p>
  
  <pre class="lang-java prettyprint-override"><code> @Override
    public final void configure(HttpSecurity http) throws Exception {
  
      http.addFilterAfter(new CustomAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class)
          .csrf()   .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
          .and()
          .antMatcher(ApplicationInfoService.API_PATH + "/info")
          .authorizeRequests().anyRequest().permitAll();
    }
  </code></pre>
  
  <p>When I make a request to something like the following; </p>
  
  <p><code>http://localhost:8080/api/record/v1/record/search?offset=0&amp;count=0</code></p>
  
  <p>the filter isn't activated. However, I did notice the url in the antMatcher did activiate the filter, so maybe there's something there. </p>
  
  <p>Either way, I'm still trying to grasp how much of the api path the <code>addUrlPattern</code> needs? Where or what else do I need to add beside adding <code>addFilter&lt;Before|After&gt;</code> in the WebSecurityConfig class. </p>
  
  <p>I have taken a look at a whole lot of examples and questions in SO, but none seem to have helped me. Hoping someone can help me understand what else I could be missing.  </p>