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 ...
随机推荐
- php -v 找不到命令
[root@localhost htdocs]# php -v -bash: php: command not found export PATH=$PATH:/usr/local/php7/bin ...
- JVM03——四种垃圾回收算法,你都了解了哪几种
在之前的文章中,已经为各位带来了JVM的内存结构与堆内存的相关介绍,今天将为为各位详解JVM垃圾回收与算法.关注我的公众号「Java面典」了解更多 Java 相关知识点. 如何确定垃圾 想要回收垃圾, ...
- Hadoop集群搭建(一)~虚拟机的创建
Hadoop集群的搭建包括,虚拟机系统的安装:安装JDK,Hadoop:克隆虚拟机:伪分布式的搭建:安装zookeeper:Hive:Hbae:Spark等等: 我将分为多篇文章来记录.这篇文章主要写 ...
- python获取群成员信息
#coding: utf-8 import itchat,datetime from itchat.content import TEXT itchat.auto_login(hotReload=Tr ...
- git提交更改都是一个作者
为什么提交到github的commit都是一个作者 参考链接 重要知识点讲解 问题如下所示 git是分布式去中心化的管理系统 ssh秘钥对生成.并把id_rsa.pub加入github.com中(这个 ...
- MySQL笔记(5)-- SQL执行流程,MySQL体系结构
MySQL的体系结构,可以清楚地看到 SQL 语句在 MySQL 的各个功能模块中的执行过程:Server层包括连接层.查询缓存.分析器.优化器.执行器等,涵盖MySQL的大多数核心服务功能,以及所有 ...
- 【简说Python WEB】Flask应用的文件结构
目录 [简说Python WEB]Flask应用的文件结构 1.文件结构的目录 2.配置程序--config.py 3.app应用包 4.剥离出来的email.py 5.蓝本(BLueprint)的应 ...
- Django魔法
(●'◡'●)
- xgboost安装与原理
1.xgboost库的安装 先在网址https://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost 中下载whl文件,注意一定要下载跟自己当前安装Python版 ...
- Keras 多层感知机 多类别的 softmax 分类模型代码
Multilayer Perceptron (MLP) for multi-class softmax classification: from keras.models import Sequent ...