当前位置:网站首页>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/*.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
边栏推荐
- ECCV2022:在Transformer上进行递归,不增参数,计算量还少!
- What should I do if selenium is reversed?
- Introduction to using NPM
- Ali on three sides: MQ message loss, repetition, backlog problem, how to solve?
- Selenium自动化测试之Selenium IDE
- JSP response对象简介说明
- Optimization of five data submission methods
- Adding data nodes and decommissioning data nodes in the cluster
- 基本语法(二)
- 六石编程学:不论是哪个功能,你觉得再没用,会用的人都离不了,所以至少要做到99%
猜你喜欢
阿里三面:MQ 消息丢失、重复、积压问题,怎么解决?
Golang - gin - pprof - use and safety
Error EPERM operation not permitted, mkdir ‘Dsoftwarenodejsnode_cache_cacach两种解决办法
Network layer key protocol - IP protocol
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法
365天挑战LeetCode1000题——Day 044 最大层内元素和 层次遍历
分布式监视 Zabbix 和 Prometheus 到底怎么选?千万别用错了!
Google Chrome(谷歌浏览器)安装使用
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
Grab the tail of gold, silver and silver, unlock the programmer interview "Artifact of Brushing Questions"
随机推荐
基于高阶微分器的无模型滑模控制器及其在自动电压调节器中的应用
ASM module in SAP Ecommerce Cloud Spartacus UI and Accelerator UI
NameNode故障处理的两种方法
NameNode (NN) 和SecondaryNameNode (2NN)工作机制
集群中增加数据节点与退役数据节点
Error IDEA Terminated with exit code 1
硬盘分区,拓展C盘,不重装系统,不重装D盘软件的全教程。
LRU缓存[线性表 -> 链表 -> hash定位 -> 双向链表]
分布式监视 Zabbix 和 Prometheus 到底怎么选?千万别用错了!
分布式锁有哪些,怎么实现(分布式锁的三种实现的对比)
alert(1) (haozi.me)靶场练习
SAP message TK 248 solved
抓住金三银四的尾巴,解锁程序员面试《刷题神器》
网络层重点协议——IP协议
P5019 [NOIP2018 提高组] 铺设道路
log4j2的使用
Productivity Tools and Plugins
Optimization of five data submission methods
Ali on three sides: MQ message loss, repetition, backlog problem, how to solve?
Grab the tail of gold, silver and silver, unlock the programmer interview "Artifact of Brushing Questions"