BUG(MyBatis)java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction. 客官°小女子只卖身不卖艺 2021-12-14 23:11 120阅读 0赞 # [java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; 报错解决][java.lang.AbstractMethodError_ org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout_Ljava_lang_Integer_] # 在mybatis+spring整合中,由于版本的问题会报错: java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:85) at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62) at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) //解决方案 1.升级 mybatis-spring 1.3.0以下会报类似错误 <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.0</version> </dependency> [java.lang.AbstractMethodError_ org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout_Ljava_lang_Integer_]: https://www.cnblogs.com/beppezhang/p/6118661.html
还没有评论,来说两句吧...