springboot项目下的Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
今天遇到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):的更多相关文章
- Mybatis中的Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 找不到Mapper.xml文件的问题
1 首先在配置mapper-locations的时候: classpath: 只在现有目录下寻找配置文件 classpath*: 在现有的项目目录下和依赖的jar包下寻找xml配置文件
- 【踩坑】遇到 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 报错
今天在重做 iblog 客户端时,测试接口情况,发现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...
- 完美解决: org.apache.ibatis.binding.BindingException Invalid bound statement (not found)
异常描述: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 原因: springboot ...
- 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 ...
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): da.huying.usermanag ...
- 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 ...
- mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误
最近在使用mybatis时,出现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 这 ...
- IDEA异常解决: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
有时候解决问题不仅仅是解决问题.-----jstarseven 最近因为开发需要,需要搭建一个ssm开发框架,采用了开发工具IDEA. 整合完了SSM开发框架之后,发布的时候出现org.apache. ...
- 通过maven test 报org.apache.ibatis.binding.BindingException: Invalid bound statement
背景 直接使用eclipse工具去执行,没有问题,通过testng.xml去执行,没有问题,但通过mvn clean test执行,就报错,提示org.apache.ibatis.binding.Bi ...
随机推荐
- java算法--稀疏数组
数据结构必要知识 线性结构 线性结构是最常用的数据结构,数据元素之间存在一对一的线性关系. 线性结构有两种不同的存储结构,即顺序存储结构和链式存储结构.顺序存储的线性表称为顺序表,顺序表中的存储元素是 ...
- 19 JPQL
使用Spring Data JPA提供的查询方法已经可以解决大部分的应用场景,但是对于某些业务来说,我们还需要灵活的构造查询条件,这时就可以使用@Query注解,结合JPQL的语句方式完成查询 @Qu ...
- ALSA 声卡 驱动 linux 4.1.36 中变化
linux 4.1.36 中变化 1ret = request_irq(IRQ_DMA2, s3c2440_dma2_irq, IRQF_DISABLED, "myalsa for play ...
- activiti设置customSessionFactories时的一个小坑
现象:activiti设置customSessionFactories不起作用,流程还是走原来的查询方法原因:新实现的XXXEntityManagerFactory的getSessionType方法返 ...
- AspNetCore3.1源码解析_2_Hsts中间件
title: "AspNetCore3.1源码解析_2_Hsts中间件" date: 2020-03-16T12:40:46+08:00 draft: false --- 概述 在 ...
- Vue2.0 【第一季】第8节 v-pre & v-cloak & v-once
目录 Vue2.0 [第一季] 第8节 v-pre & v-cloak & v-once v-pre 指令 v-cloak 指令 v-once 指令 Vue2.0 [第一季] 第8节 ...
- SIP压力测试——奇林软件kylinPET
一.Sip协议简介: SIP(Session Initiation Protocol,会话初始协议)是由IETF(Internet Engineering Task Force,因特网工程任务组)制定 ...
- ES6编译问题SyntaxError: Unexpected token import
遇到SyntaxError: Unexpected token import 如何解决 ??? 究其原因是node es6问题这还不够,因为我们没有去配置babel,所以我们需要在.babelrc去做 ...
- js遍历删除对象的key
// 如果用户没有填写值,则删除对象的key. Object.keys(obj).forEach( (key) => { if (!obj[key]) { // !obj[key]表示 ...
- Spring MVC系列-(3) Bean的装配
3. 高级装配Bean 3.1 Bean的作用域 默认情况下,Spring中的bean都是以单例的形式存在的,无论注入多少次,每次注入的都是同一个实例. 考虑到某些bean可能是可变的,Spring定 ...