mybatisplus 保错 Invalid bound statement (not found): com.ph.superchargingstationend.dao.BillMapper.updateById
时间: 2023-07-18 20:51:08 浏览: 45
这个错误通常表示 MyBatis Plus 没有找到对应的 SQL 语句,可能是因为你的 mapper.xml 中没有定义对应的 SQL 语句,或者是 mapper.xml 中定义的 SQL 语句的 id 和代码中调用的方法名不一致导致的。你可以检查一下以下几个方面:
1. 确认 mapper.xml 中是否定义了对应的 SQL 语句,且 id 和代码中调用的方法名一致。
2. 确认 mapper.xml 文件是否被正确的扫描到了,可以在启动日志中查看 MyBatis Plus 扫描的 mapper.xml 文件路径是否正确。
3. 确认代码中调用的方法名是否正确,是否与 mapper.xml 文件中定义的 id 一致。
希望这些提示能帮助你找到问题所在。
相关问题
Invalid bound statement (not found): com.ytzl.mapper.BillMapper.getBillList
Invalid bound statement (not found): com.ytzl.mapper.BillMapper.getBillList这个错误的实质是mapper接口和mapper.xml没有映射起来。 你需要检查一下com.ytzl.mapper.BillMapper接口中是否有对应的方法getBillList,并且在mapper.xml中是否正确配置了该方法的映射。确保mapper接口和mapper.xml文件中的命名空间、方法名以及参数类型和个数都是一致的。如果还是无法解决该错误,可能是由于配置文件路径不正确或者mybatis-plus版本与springboot版本不兼容等问题导致,你可以尝试更新相关依赖或者查看日志文件获取更多详细的错误信息进行排查。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Invalid bound statement (not found): com.jd.springboot.mapper.UserMapper.insert 解决方法](https://blog.csdn.net/weixin_44047784/article/details/123993594)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Invalid bound statement (not found): com.web.sysmgr.mapper.UserMapper.login](https://blog.csdn.net/louis_lee7812/article/details/127319101)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
Invalid bound statement (not found): com.lad.dao.StudentDao.updateById
这是一个数据库操作的错误信息,可能是因为在 SQL 语句中使用了错误的参数或语法。需要检查 SQL 语句和参数是否正确,并确保数据库连接正常。如果问题仍然存在,可以考虑查看相关的日志文件或联系数据库管理员进行进一步的排查。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)