当前位置:网站首页>Invalid bound statement (not found): com.exam.mapper.UserMapper.findbyid
Invalid bound statement (not found): com.exam.mapper.UserMapper.findbyid
2022-07-28 05:39:00 【jekyhu】
One 、 The emergence of problems :
When debugging code , hold mapper.xml The method in is temporarily commented out , After uncommenting , That's the mistake . The specific errors are as follows :

Two 、 resolvent :
1 . mapper.xml Medium namespace And the actual mapper The documents are inconsistent .

As shown in figure of namespace, It needs to be connected with mapper One A corresponding , Otherwise you will report an error . As shown in the figure below ,copy reference Back to namespace Can solve the problem .

2 . mapper Method names and in interfaces mapper.xml Medium id Labels are inconsistent
Here's the picture ,select id=“xxxxx” ,xxxxx Need and mapper The method names in the interface are the same .

Of these two places findbyid It is necessary to keep the same .

3 . target In the catalog mapper.xml The content of the file is inconsistent with the current , Or not built target Catalog .
target The directory path is shown in the following figure :

(1) target In the catalog mapper.xml The content of the file is inconsistent with the current
target Under the document mapper.xml:

Current mapper.xml:

You can see target Of which I commented out at that time . Remove the comments to solve the problem .
(2) Not built into target Catalog .
stay IDEA The terminal executes the following code :
mvn clean
mvn compile
边栏推荐
猜你喜欢
随机推荐
Openjudge: filter extra spaces
URL 形式
block yandex bot
Writing methods of scientific research papers: add analysis and discussion in the method part to explain their contributions and differences
Export excel, generate multiple sheet pages, and name them
restFul接口使用个人总结
Pytorch uses maxpool to realize image expansion and corrosion
Openjudge: upper and lower case letters are interchanged
FusionGAN代码学习(一)
使用深度学习训练图像时,图像太大进行切块训练预测
lamda 获取当前循环数,AtomicInteger
(dark horse) MySQL beginner advanced notes (blogger lazy dog)
FeignClient 调用GET 方法报错 ResultVO{result=未知异常,异常详情:Request method ‘POST‘ not supported
多系统架构设计思考
Mybats foreach multi select query, index loop, and cancel the and/or tag
Operation and use of collection framework
RESNET structure comparison
How to compare long and integer and why to report errors
正则表达式
Openjudge: count the number of numeric characters









