title: How to do filter mapping in AbstractAnnotationConfigDispatcherServletInitializer Spring
body: <p>Here is the problem: I can successfully register the Filter, but don't know how to set the mapping URL using this specific configuration.</p>
  
  <p>Here is my Class:</p>
  
  <pre><code>public class WebInitializer extends
          AbstractAnnotationConfigDispatcherServletInitializer {
  
      @Override
      protected Class&lt;?&gt;[] getRootConfigClasses() {
          return new Class&lt;?&gt;[]{AppConfig.class};
      }
  
      @Override
      protected Class&lt;?&gt;[] getServletConfigClasses() {
          return new Class&lt;?&gt;[]{WebConfig.class};
      }
  
      @Override
      protected Filter[] getServletFilters() {
  
          return new Filter[]{
              new DelegatingFilterProxy("springSecurityFilterChain"),
              new DelegatingFilterProxy("customFilter")
          };
      }
  
      @Override
      protected String[] getServletMappings() {
          return new String[]{"/"};
      }
  }
  </code></pre>
  
  <p>P.D. 
  I had done it using <code>WebApplicationInitializer</code>, but I want to use <code>AbstractAnnotationConfigDispatcherServletInitializer</code>.</p>