1.查看web.xml文件中的是否加载Spring配置文件applicationContext.xml
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
2.查看Spring配置文件applicationContext.xml中的<context:component-scan>
扫描包配置
<context:component-scan base-package="com." >
</context:component-scan>