IDEA错误如下:
java.lang.AbstractMethodError: Receiver class org.mybatis.spring.transaction.SpringManagedTransaction does not define or inherit an implementation of the resolved method abstract getTimeout()Ljava/lang/Integer; of interface org.apache.ibatis.transaction.Transaction.
我的错误:
mybatis和spring-mybatis 版本 不匹配
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.6</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.2</version>
</dependency>
我的解决:
修改了mybatis-spring版本
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.2</version>
</dependency>
可以找匹配的版本,mybatis3.4.5和mybatis-spring1.3.2也匹配
参考文章:https://blog.csdn.net/AirMario/article/details/53446228