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

简介: Invalid bound statement (not found)错误的可能原因

今天在执行sql的时候遇到这个问题,按说非常简单,但是出现问题的原因却不是唯一的,所以总一下:


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


<mapper namespace="me.tspace.pm.dao.UserDao">

mapper的namespace写的不对!!!注意系修改。


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


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


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


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


目录
相关文章
|
6月前
|
SQL XML Java
Invalid bound statement (not found): com.zheng.mapper.UserMapper.login
这篇文章解释了MyBatis中接口与Mapper配置文件映射绑定失败的原因,并提供了解决步骤,包括确保Mapper.xml文件的namespace与Mapper接口的类路径相同,接口方法名与XML中定义的statement id相同,以及接口方法的输入输出参数类型与Mapper.xml中定义的sql的parameterType和resultType类型匹配。
Invalid bound statement (not found): com.zheng.mapper.UserMapper.login
|
6月前
|
开发工具 git
成功解决:Svnion not found. installat
这篇文章分享了作者在使用VSCode进行SVN版本控制时遇到的一个问题,即SVN插件提示找不到`svn.exe`的问题。原因是在安装SVN时没有选择客户端工具,导致没有`svn.exe`文件。文章提供了解决方案,包括重新安装SVN时选择客户端工具,并在VSCode的`setting.json`文件中配置SVN的路径。
成功解决:Svnion not found. installat
|
6月前
|
XML Java Maven
Invalid bound statement (not found)
Invalid bound statement (not found)
54 0
|
8月前
Invalid bound statement (not found)错误【已解决】
Invalid bound statement (not found)错误【已解决】
432 1
|
9月前
|
Java
SpringBoot:Invalid bound statement (not found)的原因和解决方案
SpringBoot:Invalid bound statement (not found)的原因和解决方案
|
XML Java 数据库连接
BindingException:Invalid bound statement not found
BindingException:Invalid bound statement not found
101 0
|
编译器
解决Invalid bound statement (not found)错误~
解决Invalid bound statement (not found)错误~
106 0
|
SQL Java 数据库连接
Invalid bound statement (not found) 问题处理
您好,我是码农飞哥,感谢您阅读本文!本文将介绍使用MyBatis时出现的一些常见问题。
311 0
解决MybatisPlus中Invalid bound statement (not found)..错误
解决MybatisPlus中Invalid bound statement (not found)..错误
941 0
解决MybatisPlus中Invalid bound statement (not found)..错误
SpringBoot项目出现: Invalid bound statement (not found)可能原因
SpringBoot项目出现: Invalid bound statement (not found)可能原因
267 0
SpringBoot项目出现: Invalid bound statement (not found)可能原因