`
xiangzi21
  • 浏览: 29566 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

关于mybatis配置annotation-driven报错问题

阅读更多

spring配置mybatis事物的<tx:annotation-driven /> ,启动报错如下

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [E:\eclipseJ2EE\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ykjf\WEB-INF\classes\applicationContext-database.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationUtils.getAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

 

解决方法: 将lib下的spring-tx-3.2.jar 替换成 spring-tx-3.0.5.jar 

 

问题原因:spring-tx-*.jar版本不同导致错误

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics