栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

spring+mybatis整合时报错

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

spring+mybatis整合时报错

报错: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userDao'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.dataSource.DataSourceTransactionManager] for bean with name 'txManager' defined in class path resource [applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.dataSource.DataSourceTransactionManager

 记录一下,纯属自己犯傻

如果加了 spring-jdbc的jar包还报这个错时可能是applicationContext.xml里出错,到applicationContext.xml里面按住ctrl逐个点击[org.springframework.jdbc.dataSource.DataSourceTransactionManager]从哪里不能跳到对应文件就从哪里开始删除后再打进去,中途跳出来的文件夹点击加进去就可以了。

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/287334.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号