当我们的mybatis出现这样的异常时候:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
我先来进行解释一下原因:mapper的接口文件和mapper的xml配置文件没有进行绑定
知道了这个之后,就有解决的思路了
1. 查看springboot启动类上的@MapperScan是否正确

Mybatis-------------出现Invalid bound statement (not found)

2. 查看application.properties文件是否正确

Mybatis-------------出现Invalid bound statement (not found)

本人就是这里出现了问题,我们在创建文件夹的层集关系时候,不应该使用的

Mybatis-------------出现Invalid bound statement (not found)

Mybatis-------------出现Invalid bound statement (not found)

正规的操作文件步骤应该是

Mybatis-------------出现Invalid bound statement (not found)

要注意了,不然你的application.xml文件会扫描失败的,也就是出现我说的异常
3. 检查一下你的接口文件和xml,文件里面的方法名字和id,要一致哦,这样你就不会出现问题了哦

相关文章:

  • 2021-04-27
  • 2022-12-23
  • 2022-12-23
  • 2021-04-15
  • 2021-10-17
  • 2021-08-04
  • 2021-09-30
猜你喜欢
  • 2021-04-13
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2021-12-09
  • 2021-11-26
  • 2021-11-30
相关资源
相似解决方案