Spring WebFilter Mapping
<p>I'm trying to add a WebFilter in my spring application. However, I'm not using .xml files (not even a web.xml, because my application does not need it).</p>

<p>So, I added to my class that extends <code>AbstractAnnotationConfigDispatcherServletInitializer</code>:</p>

<pre><code>@Override
protected Filter[] getServletFilters() {
    return new Filter[]{new RequestFilter()};
}
</code></pre>

<p>And, my RequestFilter.java:</p>

<pre><code>@WebFilter("/test/*")
public class RequestFilter implements Filter {

@Override
public void init(FilterConfig filterConfig) throws ServletException { }

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
        throws IOException, ServletException { }

@Override
public void destroy() { }
</code></pre>

<p>I'm expecting that only requests matching <code>/test/*</code> pattern be filtered, but a request to any resource is filtered.</p>

<p>How I can mapping my filter?</p>

<p>Thanks.</p>