错误:
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).
参考:
https://github.com/mybatis/mybatis-3/issues/645
时间: 2024-10-27 01:16:02