title: Spring Boot Rest API filter not invoked
body: <p>I want to implement filter on my Spring Boot Rest API project but some how my filter not invoked. I have added below implementation for that.</p>
  
  <pre><code>public class AutorizationFilter implements Filter{
  Logger log = LoggerFactory.getLogger(AutorizationFilter.class);
  @Override
  public void init(FilterConfig filterConfig) throws ServletException {
      log.info("**** Start ****");
  
  }
  @Override
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          throws IOException, ServletException {
      log.info("**** doFilter ****");
      chain.doFilter(request, response);
  
  }
  @Override
  public void destroy() {
      log.info("**** end ****");
  }}
  </code></pre>
  
  <p><strong>init</strong> and <strong>destroy</strong> method are working but <strong>doFilter</strong> method not invoke.</p>
  
  <pre><code>@Configuration
  public class RestApiConfig {
  @Bean
  public FilterRegistrationBean&lt;AutorizationFilter&gt; filterRegistrationBean(){
      FilterRegistrationBean&lt;AutorizationFilter&gt; registrationBean = new FilterRegistrationBean&lt;&gt;();
      registrationBean.setFilter(new AutorizationFilter());
      registrationBean.addUrlPatterns("/**");
      return registrationBean;    
  }}
  </code></pre>
  
  <p>My controller is as below:</p>
  
  <pre><code>@RestController 
  @RequestMapping("/home")
  public class HomeController {
  @RequestMapping(value="/hello",method=RequestMethod.GET)
  public ResponseEntity&lt;Object&gt; hello() {
      Map&lt;String, Object&gt; resultMap = new HashMap&lt;&gt;();
      resultMap.put("data","called home controller");
  return new ResponseEntity&lt;&gt;(resultMap,HttpStatus.OK);
   }
  }
  </code></pre>
  
  <p>Any one please help me why <strong>dofilter</strong> method is not working.</p>