错误信息如下:

Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error opening session.
Cause: org.apache.ibatis.plugin.PluginException:
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)

原因分析:

springboot使用了mybatis分页插件Interceptor实现类的注解@Intercepts参数存在问题,由于mybatis版本升级而我们在方法上没有更新导致的。

官方的解释:

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

如何解决?

args={Connection.class, Integer.class}

如下:

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

参考文章

Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepa相关推荐

  1. org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the

    一:报错 org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for ...

  2. java 异常之Cause: org.apache.ibatis.executor.ExecutorException: Executor was closed

    文章目录 1. 背景: 2. 源代码 3. 解决办法 1. 背景: 在使用mybatis框架的时候,我们都需要初始化一个Sqlsession来执行数据库操作.一般建议最好不要把Sqlsession初始 ...

  3. Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column

    Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 为了搞这个问题, ...

  4. org.apache.ibatis.executor.ExecutorException: No constructor xx matching [java.lang.Long, java.lang]

    报错具体详情: org.apache.ibatis.executor.resultset.DefaultResultSetHandler.createByConstructorSignature(De ...

  5. org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters

    错误信息: ### Error updating database. Cause: org.apache.ibatis.binding.BindingException: Parameter 'use ...

  6. org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.

    在xml文件中碰到这样的报错的时候,有可能是你在里面使用了这种注释,编译会报错,可能这就是约定大于配置 org.apache.ibatis.exceptions.PersistenceExceptio ...

  7. Caused by: org.apache.ibatis.reflection.ReflectionException我碰到的情况,原因不唯一

    映射文件: <select id="selectKeyByUserId"  resultMap="Xxx">         <![CDATA ...

  8. Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no gette

    这里写自定义目录标题 问题起因 错误码代码如下: step 1 问题起因 很简单的id和where mapper标签的使用不知道为什么突然出现无null1getter错误 错误码代码如下: org.a ...

  9. org.apache.ibatis.builder.BuilderException: Error evaluating expression ‘p.residentCode‘. Return

    问题: Creating a new SqlSession SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@65915 ...

  10. FAQ(31):org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'ues

    进行Spring整合Mybatis时,发生的Bug: 看Log: org.mybatis.spring.MyBatisSystemException: nested exception is org. ...

最新文章

  1. OpenMP在ARM-Linux以及NDK中的编译和使用
  2. 信号与系统奥本海姆pdf_2019上海交通大学819信号系统与信号处理考研初/复试经验...
  3. python语言特点依赖平台吗_python语言的特点
  4. 白皮书丨关于工业互联网,你想知道的都在这儿
  5. mysql的建库建表语句_SQL语句(建库、建表、修改语句)
  6. iOS开发-UITableView常用方法
  7. 冬小麦病虫害的高光谱识别方法研究
  8. 46.Linux/Unix 系统编程手册(下) -- System V 消息队列
  9. matlab help函数用法,MATLAB函数用法
  10. Ubuntu20+TendaU12驱动离线安装
  11. 服务器版“永恒之蓝”高危预警 (Samba远程命令执行漏洞CVE-2017-7494) 攻击演示...
  12. 生活就像北京的地铁1
  13. 使用傲梅分区软件删除U盘分区后U盘无法识别的解决方法
  14. 2022-iOS个人开发者账号申请流程
  15. 电子护照阅读器|证件阅读机MEPR100+与MEPR100性能分析与差异化对比
  16. ROS从入门到精通5-5:局部路径规划插件开发案例(以DWA算法为例)
  17. vue3—reactive如何更改属性
  18. Python datetime 模块之timedelta
  19. backpressure 背压介绍
  20. python全栈生鲜电商_Django REST framework+Vue 打造生鲜电商项目(笔记十)

热门文章

  1. 如何制作一个vagrant的base box 及安装 additions
  2. 扫雷游戏(保姆式教程)
  3. mysql索引,索引结构,索引类型,索引失效
  4. ABAP--新语法--New Keyword in ABAP--第四天--CORRESPONDING MOVE-CORRESPONDING(DEEP) REDUCE
  5. Arcgis使用教程(十)ARCGIS地图制图之颜色样式选择设计与保存
  6. 万物之始,大道至简,衍化至繁
  7. 将doc文件转为txt文件
  8. 牛客刷题——part2
  9. 外媒称百度AI领跑全球,一场“战疫”告诉你为什么
  10. jquery的一些小小实例