spring boot配置mybatis出现Invalid bound statement (not found)报错的解决办法
背景:
spring-boot-starter-parent 2.5.6
mybatis-spring-boot-starter 2.2.0
首先,请参考下面的参考资料进行排查,确保你没有出现参考资料里列举出的错误。
我遇到这个报错,是因为使用idea创建xml文件是没有后缀,举个例子,比如你创建的是AccountMapper.xml,结果使用idea创建的是AccountMapper,根本就没有后缀!解决办法也很简单,加上后缀就可以了,不需要做其他额外的配置!也不需要在pom.xml的build标签加什么过滤配置!
参考资料:
https://blog.csdn.net/weixin_45807612/article/details/120807333
https://blog.csdn.net/weixin_45913922/article/details/129408350