Invalid bound statement (not found)报错的可能原因

Posted sunbr

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Invalid bound statement (not found)报错的可能原因相关的知识,希望对你有一定的参考价值。

1.检查xml文件所在package名称是否和Mapper interface所在的包名 或者 mapper的namespace写的不对!!!注意修改。

2.UserDao的方法在UserDao.xml中没有,然后执行UserDao的方法会报此

3.UserDao的方法返回值是List,而select元素没有正确配置ResultMap,或者只配置ResultType!

4.如果你确认没有以上问题,请任意修改下对应的xml文件,比如删除一个空行,保存.问题解决

5.看下mapper的XML配置路径是否正确

6.最坑的在这里!!如果检查上面都没问题,那么清理target目录就好了!!

以上是关于Invalid bound statement (not found)报错的可能原因的主要内容,如果未能解决你的问题,请参考以下文章

Invalid bound statement not found

Invalid bound statement (not found) 错误原因

报错 Invalid bound statement (not found): com.xxx.mapper.xxx

Invalid bound statement (not found)

Mybatis 异常记录: Invalid bound statement (not found)

mybatis错误:Invalid bound statement (not found)