当前位置:网站首页>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
边栏推荐
- 22-08-01 西安 尚医通(01)跨域配置、Swagger2、R类、统一异常处理和自定义异常、Logback日志
- [LeetCode] 83. Delete duplicate elements in the sorted list
- WebShell连接工具(中国菜刀、WeBaCoo、Weevely)使用
- 给你一个大厂面试的机会,你能面试上吗?进来看看!
- MySQL8.0.26安装配置教程(windows 64位)
- PHP WebShell 免杀
- 架构:分布式任务调度系统(SIA-Task)简介
- 【LeetCode】104. Maximum depth of binary tree
- OC中new和init的区别
- VPS8702 VPSC(源特科技)电源管理(PMIC) 封装SOT23-6
猜你喜欢
Navicat cannot connect to database Mysql because of WiFi
7、MySQL Workbench 导出导入数据库
feign调用不通问题,JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
2W字!梳理50道经典计算机网络面试题(收藏版)
svm.SVC application practice 1--Breast cancer detection
"Paid paddling" stealthily brushes Brother Ali's face scriptures, challenges bytes three times, and finally achieves positive results
生成器知道鉴别器在无条件GANs中应该学习什么
pyqt上手体验
Flask 报错:WARNING This is a development server. Do not use it in a production deployment
MySQL8.0.28安装教程
随机推荐
咨询cdc for oracle,增量同步scan.startup.mode只有initial和la
Lombok
mysql 查看死锁
Qt自定义控件和模板分享
OC中new和init的区别
【无标题】【Koltin Flow(三)】Flow操作符之中间操作符(二)
递归检查配置项是否更变并替换
国标GB28181协议EasyGBS平台兼容老版本收流端口的功能实现
【LeetCode】1374. Generate a string with an odd number of each character
1688API
MySQL八股文背诵版
Curriculum Vitae;CV
[LeetCode] 83. Delete duplicate elements in the sorted list
(1) Redis: Key-Value based storage system
01-Node-Express系统框架搭建(express-generator)
svm.SVC application practice 1--Breast cancer detection
C#测试项目中属性的用法
忽晴忽雨
淘宝详情.
MySQL函数(经典收藏)