This is optional, you really don't need it just for Spring MVC ( DispatcherServlet will do). But adding Spring security to your Spring MVC should be done with
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
Just one note, if you are using ContextLoaderListener , you will need to add DelegatingFilterProxy :
<listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/admin</url-pattern> </filter-mapping> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring-security.xml </param-value> </context-param>
in your web.xml. Sorry for being too late. Greetings
trinity Aug 08 '16 at 19:30 2016-08-08 19:30
source share