是的,仅 当
您在加载应用程序时也要加载其他Spring上下文xml文件并且您可以将它们指定为时,才需要添加
ContextLoaderListener。
web.xml
<context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring-security.xml </param-value></context-param>

是的,仅 当
您在加载应用程序时也要加载其他Spring上下文xml文件并且您可以将它们指定为时,才需要添加
ContextLoaderListener。
web.xml
<context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring-security.xml </param-value></context-param>