Question: To register a custom filter that applies only to certain URL patterns, you should remove the **\_** annotation from the filter class and register a @Bean of type `_` in Spring @Configuration.

  1. @RequestMapping; WebRequest
  2. @Controller; URLFilter
  3. @WebFilter; ServletContextInitializer
  4. @Component; FilterRegistrationBean

Answer: The correct answer of the above question is Option D:@Component; FilterRegistrationBean