I recently switched a majority of my Spring configuration to use the code based config in Spring 3.1. However, now that I\'ve switched, my Spring Security is not working correc
I got it working with Spring 3.2.3 and Servlet 3.0. The tick is to extend DelegatingFilterProxy class and named it SpringSecurityFilterChain.
public class ServiceInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
@Override
protected Class>[] getRootConfigClasses() {
return new Class>[] { ApplicationConfig.class };
}
@Override
protected Class>[] getServletConfigClasses() {
return new Class>[] { WebConfig.class };
}
@Override
protected String[] getServletMappings() {
return new String[] { "/" };
}
@Override
protected Filter[] getServletFilters() {
return new Filter[] { new OpenEntityManagerInViewFilter(), new SpringSecurityFilterChain() };
}
public class SpringSecurityFilterChain extends DelegatingFilterProxy {
}
}