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版本不同导致错误