spring boot配置mybatis出现Invalid bound statement (not found)报错的解决办法

发布时间 2023-04-23 09:00:42作者: jamstack

 背景:

spring-boot-starter-parent 2.5.6
mybatis-spring-boot-starter 2.2.0

我遇到这个报错,是因为使用idea创建xml文件是没有后缀,举个例子,比如你创建的是AccountMapper.xml,结果使用idea创建的是AccountMapper,根本就没有后缀!解决办法也很简单,加上后缀就可以了,不需要做其他额外的配置!

参考资料:

https://blog.csdn.net/weixin_45807612/article/details/120807333

https://blog.csdn.net/weixin_45913922/article/details/129408350