码迷,mamicode.com
首页 > 编程语言 > 详细

MyBatis3.4.0以上的分页插件错误:Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepare. Cause: java.lang.NoSuchMethodException: org.apache.ibatis.executor.stateme

时间:2017-06-20 22:56:08      阅读:414      评论:0      收藏:0      [点我收藏+]

标签:color   版本   handler   exe   get   .exe   exec   except   log   

错误:

Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepare. Cause: java.lang.NoSuchMethodException: org.apache.ibatis.executor.statement.StatementHandler.prepare(java.sql.Connection)] with root cause

问题解决:

其实这个是版本更新之后,官方取消了这个函数,转而升级了两个参数的方法,改动如下:

@Intercepts({ @Signature(type = StatementHandler.class, method = "prepare", args = { Connection.class, Integer.class }) })

官方的解释如下:

In 3.4.0, StatementHandler#prepare(Connection) has been changed to StatementHandler#prepare(Connection,Integer).

See https://github.com/mybatis/mybatis-3/blob/master/src/main/java/org/apache/ibatis/executor/statement/StatementHandler.java#L33-L34 .

参考:

https://github.com/mybatis/mybatis-3/issues/645

MyBatis3.4.0以上的分页插件错误:Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepare. Cause: java.lang.NoSuchMethodException: org.apache.ibatis.executor.stateme

标签:color   版本   handler   exe   get   .exe   exec   except   log   

原文地址:http://www.cnblogs.com/EasonJim/p/7056700.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!