title: How to specify Filter execution order using Spring's Java Configuration?
body: <p>I have the following piece of code in my initializer:</p>
  
  <pre><code>public class AppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
  
      @Override
      protected Filter[] getServletFilters() {
  
          DelegatingFilterProxy shiroFilter = new DelegatingFilterProxy("shiroFilter");
          shiroFilter.setTargetFilterLifecycle(true);
  
          return new Filter[]{new CorsFilter(),shiroFilter};
      }
  }
  </code></pre>
  
  <p>I want <code>CorsFilter</code> to be executed before <code>ShiroFilter</code>. However, the Spring documentation doesn't say that the order in which the filters are executed is determined by their order in the returned array.</p>
  
  <p>If it is, can someone please clarify it? If not, can someone suggest how <em>do</em> I guarantee the execution order of filters?</p>