异常记录---Error creating bean with name 'sqlSessionFactory

Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-dao.xml]: Error 
setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested 
PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'dataSource' threw exception; nested 
exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/TransactionAwareDataSourceProxy

在maven工程下  Junit测试  dao 层报错,  原因是缺少spring-jdbc  jar包

引入依赖即可

                <dependency>
		    <groupId>org.springframework</groupId>
		    <artifactId>spring-jdbc</artifactId>
		    <version>4.3.7.RELEASE</version>
		</dependency>




阅读更多
文章标签: spring
个人分类: java异常
上一篇二叉树的遍历--java实现(递归与非递归实现)
下一篇Linux的目录结构
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭