web.xml文件没有配置spring-security.xml文件
<!-- 配置加载类路径的配置文件 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext.xml,classpath*:spring-security.xml</param-value>
</context-param>
转: https://www.cnblogs.com/elian91/p/11369018.html