当前位置:网站首页>Reasons and solutions for Invalid bound statement (not found)
Reasons and solutions for Invalid bound statement (not found)
2022-07-30 06:47:00 【asdfadafd】
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/*.xmlThe above two steps are indispensable, so the problem is solved.
Let me introduce myself first. The editor graduated from Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Ali 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
边栏推荐
猜你喜欢

The operations engineer interview experience
![[Mozhe Academy] Identity Authentication Failure Vulnerability Actual Combat](/img/c3/4a4e23a97e4650a17ff5cfc5233043.png)
[Mozhe Academy] Identity Authentication Failure Vulnerability Actual Combat

oracle行转列、列转行总结

Understand JDBC in one article

jsonpath
![Monstache执行monstache -f config.toml出错No processor type exists with name [attachment] [type=parse_exc](/img/2d/50c9001125cd613087044d2b6c78b1.png)
Monstache执行monstache -f config.toml出错No processor type exists with name [attachment] [type=parse_exc

Offensive and defensive world easy_web
![[MATLAB]图像处理——交通标志的识别](/img/45/1a5797a17ebf6db965a64c85e0f037.png)
[MATLAB]图像处理——交通标志的识别

Arrays工具类的使用
phpok website vulnerability exploitation analysis
随机推荐
Detailed MySQL-Explain
互联网商城盲盒app为何如此火爆
连接云服务器Docker中的Mysql 详细图文操作(全)
通信中间件 Fast DDS 基础概念简述与通信示例
运维工程师面试经历
Detailed introduction to the usage of Nacos configuration center
CTF之misc-图片隐写
Nacos配置中心用法详细介绍
国内数字藏品交易平台开发市场会开放二级市场吗
jsonpath
CTF之misc-其他类型隐写
"MySQL Advanced Chapter" four, the storage structure of the index
根据ip地址获取地理位置及坐标(离线方式)
FastAPI Quick Start
CTF之misc-文件隐写
Dcat Admin 安装
[MATLAB] Image Processing - Recognition of Traffic Signs
C# WPF中监听窗口大小变化事件
[HCTF 2018]admin
oracle行转列、列转行总结