首页 > 代码库 > java.lang.NoSuchMethodException: org.apache.ibatis.executor.statement.StatementHandler.prepare(java.sql.Connection)

java.lang.NoSuchMethodException: org.apache.ibatis.executor.statement.StatementHandler.prepare(java.sql.Connection)

此错误是由于版本造成的,如果使用mybatis3.4版本以上,配置拦截器规则应增加Intger

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

 

java.lang.NoSuchMethodException: org.apache.ibatis.executor.statement.StatementHandler.prepare(java.sql.Connection)