当前位置:网站首页>Invalid bound statement (not found): com.exam.mapper.UserMapper.findbyid
Invalid bound statement (not found): com.exam.mapper.UserMapper.findbyid
2022-07-28 05:16:00 【jekyhu】
一、问题的出现:
调试代码的时候,把mapper.xml中的方法暂时的注释掉了,之后解除注释后,就出现了这个错误。具体报错如下:

二、解决方法:
1 . mapper.xml中的namespace和实际的mapper文件不一致。

如图中的 namespace,需要和实体类中的mapper一 一对应,否则就会报错。如下图一样,copy reference后放到namespace中就可以解决问题。

2 . mapper接口中的方法名和mapper.xml中的id标签不一致
如下图,select id=“xxxxx” ,xxxxx需要和mapper接口中的方法名一致。

此两处的 findbyid 是需要保持一样的。

3 . target目录下的mapper.xml文件内容与当前的不一致,或者没有构建进target目录。
target目录路径如下图:

(1) target目录下的 mapper.xml 文件内容与当前的不一致
target 文件下的 mapper.xml:

当前的 mapper.xml:

可以看到target中的被我当时注释掉的。把注释去掉就解决问题了。
(2)没有构建进target目录。
在IDEA终端执行下面的代码 :
mvn clean
mvn compile
边栏推荐
- SMD component size metric English system corresponding description
- Specific differences between typedef and define
- Paper reading notes -- crop yield prediction using deep neural networks
- Clickhouse填坑记2:Join条件不支持大于、小于等非等式判断
- YUV to uiimage
- PC端-bug记录
- How to send and receive reports through outlook in FastReport VCL?
- HDU 3585 maximum shortest distance
- 【ARXIV2204】Vision Transformers for Single Image Dehazing
- 7.<tag-字符串和API的取舍>补充: 剑指 Offer 05. 替换空格
猜你喜欢

Paper reading notes -- crop yield prediction using deep neural networks

11. < tag dynamic programming and subsequence, subarray> lt.115. Different subsequences + Lt. 583. Deletion of two strings DBC
![[internal mental skill] - creation and destruction of function stack frame (C implementation)](/img/a9/81644ee9ffb74a5dc8ff1bc3977f49.png)
[internal mental skill] - creation and destruction of function stack frame (C implementation)

在ruoyi生成的对应数据库的代码 之后我该怎么做才能做出下边图片的样子

Driving the powerful functions of EVM and xcm, how subwallet enables Boca and moonbeam

21 day SQL punch in summary

Dcgan:deep volume general adaptive networks -- paper analysis

Online sql to XML tool

MySQL date and time function, varchar and date are mutually converted

Duoyu security browser will improve the security mode and make users browse more safely
随机推荐
HDU 2874 connections between cities
在ruoyi生成的对应数据库的代码 之后我该怎么做才能做出下边图片的样子
HDU 1530 maximum clique
C language characters and strings
Paper reading notes -- crop yield prediction using deep neural networks
如何在 FastReport VCL 中通过 Outlook 发送和接收报告?
为什么md5不可逆,却还可能被md5免费解密网站解密
New methods and features of ES6 built-in objects
Scope, execution process and life cycle of bean
Tips for using swiper (1)
Pipe /createpipe
HDU 3078 network (lca+ sort)
11. < tag dynamic programming and subsequence, subarray> lt.115. Different subsequences + Lt. 583. Deletion of two strings DBC
Printf function of input and output function in C language
2022 summer practice (PowerDesigner tutorial learning record) (first week)
Why is MD5 irreversible, but it may also be decrypted by MD5 free decryption website
Transformer -- Analysis and application of attention model
Internal implementation principle of yymodel
这种动态规划你见过吗——状态机动态规划之股票问题(中)
微服务故障模式与构建弹性系统