当前位置:网站首页>Reasons and solutions for Invalid bound statement (not found)
Reasons and solutions for Invalid bound statement (not found)
2022-08-02 03:00:00 【m0_54861649】
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:
- Are the method names in the mapper file and xml 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/*.xml
The 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
边栏推荐
- mysql8.0.28 download and installation detailed tutorial, suitable for win11
- Swift运行时(派发机制)
- Invalid bound statement (not found)出现的原因和解决方法
- analog IC layout-Parasitic effects
- Go语学习笔记 - gorm使用 - gorm处理错误 Web框架Gin(十)
- 第10章_索引优化与查询优化
- Tree Chain Segmentation-
- 1. 获取数据-requests.get()
- 【LeetCode】20. Valid parentheses
- 7、MySQL Workbench 导出导入数据库
猜你喜欢
Common SQL interview questions: 50 classic examples
给你一个大厂面试的机会,你能面试上吗?进来看看!
"Paid paddling" stealthily brushes Brother Ali's face scriptures, challenges bytes three times, and finally achieves positive results
mysql8.0.28下载和安装详细教程,适配win11
MySQL8.0.26安装配置教程(windows 64位)
PHP WebShell 免杀
“带薪划水”偷刷阿里老哥的面经宝典,三次挑战字节,终成正果
2022牛客多校四_G M
analog IC layout-Design for reliability
Tree Chain Segmentation-
随机推荐
很有意思的经历,很有意思的项目--文件夹对比工具
Duplicate entry ‘XXX‘ for key ‘XXX.PRIMARY‘解决方案。
【LeetCode】144. Preorder Traversal of Binary Tree
PHP WebShell 免杀
消息队列经典十连问
第10章_索引优化与查询优化
IPFS deployment and file upload (golang)
非稳压 源特电子 隔离电源模块芯片 5W VPS8504B 24V
mysql使用on duplicate key update批量更新数据
VPS8505 微功率隔离电源隔离芯片 2.3-6V IN /24V/1A 功率管
C#测试项目中属性的用法
leetcode 143. 重排链表
analog IC layout-Parasitic effects
WebShell特征值汇总与检测工具
直击程序员面试现场:百度面试官都问了我些啥?
* Compare version numbers
Heuristic merge, DSU on Tree
搭建zabbix监控及邮件报警(超详细教学)
Swift运行时(派发机制)
详解最强分布式锁工具:Redisson