今天遇到mybatis-puls的报错Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

排查方法如下:

1、mapper接口和mapper.xml是否在同一个包(package)下?名字是否一样(仅后缀不同)?

2、mapper.xml的命名空间(namespace)是否跟mapper接口的包名一致?

3、接口的方法名,与xml中的一条sql标签的id一致

4、配置文件中的配置

#mybatis
mybatis-plus:
mapper-locations: classpath:**/*Mapper.xml

5、如果你的项目是maven项目,请你在编译后,到接口所在目录看一看,很有可能是没有生产对应的xml文件,因为maven默认是不编译的,因此,你需要在你的pom.xml的<build></build>里面,加这么一段:

<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>

我的问题就出在第5部,因为之前没怎么接触maven项目,所以新建项目后并没有在pom中加上编译的配置,导致一直找不到绑定失败。今把问题记录方便日后好进行回忆查看

springboot项目下的Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的更多相关文章

  1. Mybatis中的Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 找不到Mapper.xml文件的问题

    1 首先在配置mapper-locations的时候: classpath:  只在现有目录下寻找配置文件 classpath*: 在现有的项目目录下和依赖的jar包下寻找xml配置文件

  2. 【踩坑】遇到 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 报错

    今天在重做 iblog 客户端时,测试接口情况,发现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...

  3. 完美解决: org.apache.ibatis.binding.BindingException Invalid bound statement (not found)

    异常描述: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 原因: springboot ...

  4. Java报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.sirifeng.babytun.dao.GoodsDAO.findById

    前言 最近学vue学得差不多了,想来搭个项目实战一下,结果刚开始搭建SSM框架的时候就来到了我们最喜欢的debug环节 org.apache.ibatis.binding.BindingExcepti ...

  5. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): da.huying.usermanag ...

  6. Exception:HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    主要错误信息如下: HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...

  7. mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误

    最近在使用mybatis时,出现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 这 ...

  8. IDEA异常解决: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    有时候解决问题不仅仅是解决问题.-----jstarseven 最近因为开发需要,需要搭建一个ssm开发框架,采用了开发工具IDEA. 整合完了SSM开发框架之后,发布的时候出现org.apache. ...

  9. 通过maven test 报org.apache.ibatis.binding.BindingException: Invalid bound statement

    背景 直接使用eclipse工具去执行,没有问题,通过testng.xml去执行,没有问题,但通过mvn clean test执行,就报错,提示org.apache.ibatis.binding.Bi ...

随机推荐

  1. C++ 删除字符串中的数字并重新按顺序排列

    #include <stdio.h> #include <string.h> char* Find_str(char* p) { ; i < strlen(p); i++ ...

  2. .NET实现一个简单的IOC容器

    目录 1.主要细节 2.具体示例 参考及示例代码下载 shanzm-2020年3月17日 20:06:01 1.主要细节 使用反射程序集的方式获取对象的类型 通过反射的方式获取指定类型的的所有公共属性 ...

  3. EPX Studio产品功能介绍

    EPX主要面向谁解决什么问题   EPX是什么? EPX基于计算机语言 EPX是利用基于Pascal的FastScript语言作为基础语言,在其中增加了许多函数与特性的一个扩展,将EPX组件本身融入到 ...

  4. Natas8 Writeup(常见编码、php函数)

    Natas8: 同样给了php源码,审计源码,发现给了一个预设参数encodedSecret,以及一个加密函数encodeSecret, 该函数将secret参数先进行base64编码.然后用strr ...

  5. 高性能-GC

    带着问题去思考!大家好 相对.NET 来说.CLR去处理了,C,C++这些就需要手动去垃圾回收. GC大部分容易察觉的性能问题.其实很多问题实际是哪个都是由于对垃圾回收器的行为和预期结果理解有误.在, ...

  6. Vysor Pro1.9.3破解,连接 USB 数据线在电脑上远程控制 Android 手机平板/同步显示画面

    Vysor PRO 破解方法 1.下载Vysor Pro,   Vysor Pro下载地址 ,chrome版需要挂梯子. 下载后,能连接,但是清晰度太低,能使用的功能也很少,下面我们就开始来破解它. ...

  7. Fast and accurate bacterial species identification in urine specimens using LC-MS/MS mass spectrometry and machine learning (解读人:闫克强)

    文献名:Fast and accurate bacterial species identification in urine specimens using LC-MS/MS mass spectr ...

  8. Cisco 综合配置(三)

    要求: 1.PC1 PC2使用DHCP,获取IP ,VLAN为10 和20,网关在Core Switch 2上2.DHCP和web server VLAN为100,网关在Core Switch 1上3 ...

  9. Linux 基础篇

    本文使用系统为 :CentOS 7 1.文件操作 增: touch a.txt   #增加文件 mkdir test  # 增加目录   参数:-p 创建多级目录   ; 删: rm a.txt  # ...

  10. sql-lib闯关61-65

    第六十一关 和六十关基本一样,就是变成了单引号和双括号,这好像是第一次遇见双括号 爆数据库名   ?id=1'))and extractvalue(1, concat(0x5c, (select da ...