mybatis,spring整合的时候报错:
java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()L
原因:版本不兼容
原始是好的:
<mybatis.version>3.2.6</mybatis.version>
<mybatis-spring.version>1.2.2</mybatis-spring.version>
修改之后如上问题:
<mybatis.version>3.4.1</mybatis.version>
<mybatis-spring.version>1.2.2</mybatis-spring.version>
继续修改
<mybatis.version>3.4.1</mybatis.version>
<mybatis-spring.version>1.3.0</mybatis-spring.version>
OK,可以正常运行了。
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>${mybatis-spring.version}</version>
</dependency>