org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxxx.mapper.UserMapper.selectUser

报错原因:mapper接口和mapper.xml文件没有映射起来
解决方法
第一种:mapper.xml中的namespace和实际的mapper文件不一致
第二种:mapper接口中的方法名和mapper.xml中的id标签不一致
第三种:Mapper.xml没有构建进去
第四种:配置文件导不出来

报错原因:mapper接口和mapper.xml文件没有映射起来

解决方法

第一种:mapper.xml中的namespace和实际的mapper文件不一致

第二种:mapper接口中的方法名和mapper.xml中的id标签不一致

第三种:Mapper.xml没有构建进去

打开target看看对应的Mapper.xml文件在不在,如果不在,点击右边的maven,clean一下,再Run一下

第四种:配置文件导不出来

maven的配置文件默认放在resources目录下,但在这里需要把它放到java目录下,导致配置文件导不出来

这属于资源过滤问题

解决方法: 需要手动配置资源过滤,让它把java目录下的properties和xml等配置文件的过滤开启,使它们能够被导出,在pom.xml中配置开启过滤

<!--在build中配置resources,来防止我们资源导出失败的问题-->
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

自己碰到了参考链接:

Invalid bound statement (not found)解决方法_人间游客的博客-CSDN博客

第三种请款有可能clean一次不行,多试几次几时target下的xml导出来了就可以了。

【Spring+Mybatis】 Invalid bound statement (not found): com.xxxx.mapper.UserMapper.selectUser相关推荐

  1. springboot整合mybatis错误 Invalid bound statement (not found): com.yuan.mapper.UserMapper.getUserList

    出现的原因是 src文件下的mapper有mapper接口和映射文件,而target下的mapper文件却没有映射文件 =解决方案======== 1.把映射文件 放到resources 目录下 结构 ...

  2. spring boot Invalid bound statement (not found): com.su.mapper.UserMapper.getAllUsers

    今天说一下在springboot整合mybatis上遇到的坑,我是看视频学的,跟着视频里建的文件夹是这样的 然后运行程序报错,Invalid bound statement (not found): ...

  3. Invalid bound statement (not found): com.exam.mapper.UserMapper.findbyid

    一.问题的出现: 调试代码的时候,把mapper.xml中的方法暂时的注释掉了,之后解除注释后,就出现了这个错误.具体报错如下: 二.解决方法: 1 . mapper.xml中的namespace和实 ...

  4. Invalid bound statement (not found): com.itheima.mapper.userMapper.SelectAll

    根本原因 mapper映射文件没有被加载 最低级原因 1.mapper接口中的方法名和mapper映射文件中的id名是否一致 2mapper映射文件的名称空间的值 是否是mapper接口的权限名(包类 ...

  5. mybatis-plus出错:Invalid bound statement (not found): com.kuang.mapper.UserMapper.selectList

    错误点: 原因:UserMapper继承BaseMapper,让我们看看BaseMapper 可以发现,BaseMapper使用的是范型.所以上边我们UserMapper继承的BaseMapper也要 ...

  6. mybatis(xml)报错:Invalid bound statement (not found): com.zjw.mapper.second.HospitalMapper.insert(已解决)

    今天开发中遇到一个问题: Invalid bound statement (not found):com.zjw.mapper.second.HospitalMapper.insertSelectiv ...

  7. Invalid bound statement (not found): com.xxxx.dao.other.LoginDao.getUser

    原来是能正常运行的,后想把登录相关的调整一下目录,对应登录的文件都调整到了other下边,启动服务,请求时报错: Invalid bound statement (not found): com.xx ...

  8. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxxx.phb.mappe

    前言 最近项目开发时,批量提交数据,报错 ❌信息如下 org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...

  9. spring boot 集成Mybatis时 Invalid bound statement (not found)

    spring boot 集成Mybatis时,运行提示 org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...

最新文章

  1. binary search完整笔记
  2. [HAOI2006]均分数据
  3. spring boot原理_SpringBoot-02-原理初探之主启动类
  4. Postgre体系结构图
  5. 序列化(串行化)- 使用BinaryFormatter进行序列化
  6. IREC-GAN:在线推荐中基于模型的对抗训练强化学习
  7. JSLint说“缺少基数参数”
  8. Python的is和==区别
  9. 【时间序列分析】01.时间序列与平稳序列
  10. kettle 创建脚本文件
  11. Win10如何查看打印机端口号?
  12. 480位禅宗大德悟道因缘
  13. 如何添加网络打印机-查看IP地址就可以
  14. 防摸鱼小软件——鼠标键盘检测器
  15. 【B站弹幕数据分析】B站独家付费番剧鬼灭之刃的前12集的弹幕数据分析
  16. Java中的Switch用法
  17. 【进阶版】机器学习之决策树知识与易错点总结(06)
  18. 【论文阅读】针对快速和准确的超分辨率深度拉布拉斯金字塔网络
  19. LeetCode刷题Python实录
  20. cannot create temp file for here-document: No space left on device

热门文章

  1. Spring系列——@lazy注解
  2. antv g2字体阴影_antv g2 notes
  3. kafka问题之Listener method could not be invoked with the incoming message
  4. C. Good Subarrays
  5. zabbix 5.0所有依赖包_开源的Zabbix报表系统ZbxTable正式发布!
  6. AcWing 95. 费解的开关(推理)
  7. GeeM2传奇引擎进入游戏出现白屏的解决办法
  8. AudioToolbox使用方法总结
  9. [15元]人体行为检测和识别毕业论文讲述
  10. matlab梯形法数值积分,数值积分(梯形法)