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
Thank you everyone for the above hints concerning a springSecurityFilterChain when Java configuration of Spring is used. As I've worked along to apply these hints to fix a comparable error in my own code, I noted that the Spring documentation for org.springframework.web.WebApplicationInitializer (the interface implemented by AbstractAnnotationConfigDispatcherServletInitializer) has the following relevant "Caveat":
web.xml versioning
WEB-INF/web.xml and WebApplicationInitializer use are not mutually exclusive; for example, web.xml can register one servlet, and a WebApplicationInitializer can register another. An initializer can even modify registrations performed in web.xml through methods such as ServletContext.getServletRegistration(String).
However, if WEB-INF/web.xml is present in the application, its version attribute must be set to "3.0" or greater, otherwise ServletContainerInitializer bootstrapping will be ignored by the servlet container.
I point this out because I noticed that your web.xml version noted above is still 2.5.