首先看一下报错信息
首先一看报错信息,bean创建失败,创建bean的配置就只有spring.xml中才有配置,看着这种错,果断打开spring.xml;
由于有些地方不方便透漏,改成了**,可以自行脑补
错误的地方可能存在与1:
包扫描没有配置
<!-- 自动包扫秒 -->
<context:component-scan base-package="com.**">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
2:
在web.xml里没有加载spring容器,这个就需要回到web.xml查看是否配置spring 的监听器
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
3:注意单词大小写,可能是大小写误差,特别是引用的:::
<property name="dataSource" ref="dataSource"></property>
4:jar包版本引起的冲突,这个我需要总结一下,,