当前位置:网站首页>Reasons and solutions for Invalid bound statement (not found)
Reasons and solutions for Invalid bound statement (not found)
2022-07-31 13:15:00 【m0_67403240】
Steps to resolve errors
What went wrong
Error screenshot:
//BindingException data binding exception not found cannot be found
org.apache.ibatis.binding.BindingException:
Invalid bound statement (not found): com.kuan.edu.mapper.CourseMapper.getPublishCourseInfo
Possible Causes
Possible reasons for this error:
- Whether the method names in the mapper file and xml are the same


Usually this will not be a problem - Problems caused by maven's default loading mechanism
When maven is loaded, the .java type files in the java folder are compiled, and other types of files will not be loaded

Solution
Solution:
Copy xml to target directory (not recommended)
Put the xml file in the resources directory (not recommended)
Implementation through configuration
(1) Configure in the pom.xml file, let maven load the xml file by default, and then rebuild itsrc/main/java **/*.xml false
After the build, we can see that the xml file appears in the target
(2) Add configuration in the Spring Boot configuration file application.proper (note that the path should be changed to where your xml is located)
#Configure the path of the mapper xml filemybatis-plus.mapper-locations=classpath:com/kuan/edu/mapper/xml/*.xmlThe above two steps are indispensable, so the problem is solved.
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
- Detailed explanation of network protocols and related technologies
- 聊聊 SAP 产品 UI 上的消息显示机制
- 网络协议及相关技术详解
- pytorch gpu版本安装最新
- How IDEA runs web programs
- 六石编程学:不论是哪个功能,你觉得再没用,会用的人都离不了,所以至少要做到99%
- C#使用ComboBox控件
- 文本相似度计算(中英文)详解实战
- 攻防演练丨赛宁红方管控平台走进广东三地 助力数字政府网络安全建设
猜你喜欢

IDEA版Postman插件Restful Fast Request,细节到位,功能好用

深圳某游戏研发公司每个工位都装监控,网友:堪比“坐牢”!

Grab the tail of gold, silver and silver, unlock the programmer interview "Artifact of Brushing Questions"

C#获得网卡信息 NetworkInterface IPInterfaceProperties

浏览器被hao360劫持解决办法

跨境电商小知识之跨境电商物流定义以及方式讲解

爱可可AI前沿推介(7.31)

Hard disk partition, expand disk C, no reshipment system, not heavy D dish of software full tutorial.

C# 中的Async 和 Await 的用法详解

Batch大小不一定是2的n次幂!ML资深学者最新结论
随机推荐
基于改进YOLOv5的轻量化航空目标检测方法
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
Selenium IDE for Selenium Automation Testing
STM32——软件SPI控制AD7705[通俗易懂]
PyQt5快速开发与实战 9.7 UI层的自动化测试
365-day challenge LeetCode1000 questions - Day 044 Maximum element in the layer and level traversal
C#Assembly的使用
numpy矩阵和向量的保存与加载,以及使用保存的向量进行相似度计算
PyQt5 rapid development and actual combat 10.2 compound interest calculation && 10.3 refresh blog clicks
LRU缓存[线性表 -> 链表 -> hash定位 -> 双向链表]
基于高阶微分器的无模型滑模控制器及其在自动电压调节器中的应用
Grab the tail of gold, silver and silver, unlock the programmer interview "Artifact of Brushing Questions"
电商rpa是什么意思?跟电商rpi是一个意思吗?
How IDEA runs web programs
使用openssl命令生成证书和对应的私钥,私钥签名,公钥验签
The operator,
pytorch gpu版本安装最新
ASM module in SAP Ecommerce Cloud Spartacus UI and Accelerator UI
The cluster of safe mode
CentOS7 installation MySQL graphic detailed tutorial