项目报错:Invalid bound statement (not found):

Posted zhang-yawei

tags:

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

出现这种错误有好多种情况,常见的错误有以下这些:

1.检查xml文件所在package名称是否和Mapper interface所在的包名

<mapper namespace="com.energy.modules.pv.dao.UserDao">
 mapper的namespace写的不对!!!注意系修改;

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

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

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

5.看下mapper的XML配置路径是否正确;
6.还有一种奇葩事件,是点页面多个接口报同样的错误,代码也没改,前一分钟还能用,突然就报错,重新clean,然后重新编译打包,运行,发现问题解决了;

7.如果不小心在mybatis的xml中的sql里面如果加了分号,也会报此错误;

转载借鉴地址:https://blog.csdn.net/hao134838/article/details/87286458

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

eclipse java项目转idea java项目Invalid bound statement (not found): com.mapper 报错问题

springboot+mybatis报错Invalid bound statement (not found)

Maven项目使用mybatis报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):(

ssm项目报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),求教

mybatis报错:BindingException: Invalid bound statement (not found)

mybatis plus报错:Invalid bound statement (not found)