异常记录---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>




阅读更多

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