Invalid bound statement (not found)在Service层出现
时间: 2023-10-15 16:26:06 浏览: 63
当在Service层出现"Invalid bound statement (not found)"错误时,可能是由于MyBatis或MyBatis Plus配置问题导致的。一种可能的原因是在Mapper接口中找不到与方法名对应的SQL语句。这可能是由于Mapper接口或XML文件中的命名错误引起的。
解决这个问题的方法是检查Mapper接口和XML文件中的命名是否一致。确保在XML文件中正确定义了与Service层对应方法名相同的SQL语句。还可以尝试重新生成或刷新Mapper接口和XML文件,确保它们的一致性。
此外,还可以检查配置文件中是否正确配置了Mapper扫描路径,以确保MyBatis能够正确加载Mapper接口和XML文件。
如果以上方法都没有解决问题,可以尝试查看日志文件,查找更详细的错误信息,以便更好地定位问题所在。希望这些方法可以帮助您解决"Invalid bound statement (not found)"错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [在service层报错Invalid bound statement (not found)](https://blog.csdn.net/weixin_45093753/article/details/130597269)[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: 33.333333333333336%"]
- *2* [mybatisplus报Invalid bound statement (not found)错误的解决方法](https://download.csdn.net/download/weixin_38625442/12821082)[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: 33.333333333333336%"]
- *3* [MybatisPlus BaseMapper 中的方法全部 Invalid bound statement (not found Error处理)](https://download.csdn.net/download/weixin_38524871/12820792)[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: 33.333333333333336%"]
[ .reference_list ]
相关推荐
![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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)