Mybatisplus org.apache.ibatis.binding.BindingException:
时间: 2023-10-15 12:26:16 浏览: 64
Mybatisplus的org.apache.ibatis.binding.BindingException是一种常见的异常,表示绑定语句无效(未找到)。这个异常通常发生在使用mybatis或mybatis-plus作为持久化框架时,通过dao层接口调用xml中配置好的sql时。
出现这个异常的原因可能有几种:
1. SQL语句没有正确配置或命名错误,导致无法找到对应的绑定语句。
2. Dao层接口没有正确绑定或命名错误,导致无法找到对应的绑定语句。
解决这个异常的方法有以下几种:
1. 检查SQL语句的配置和命名是否正确,并确保与Dao层接口的绑定一致。
2. 检查Dao层接口的绑定和命名是否正确,并确保与SQL语句的配置一致。
3. 确保XML配置文件中正确引入了Mapper接口,并且Mapper接口中的方法与XML文件中的配置一致。
4. 如果使用了mybatis-plus,可以尝试使用其提供的CRUD代码生成器来生成Dao层接口和XML文件,可以减少手动配置错误的可能性。
5. 检查依赖的版本是否兼容,有时不同的版本之间可能存在一些兼容性问题。
通过以上方法,可以解决Mybatisplus的org.apache.ibatis.binding.BindingException异常。请根据具体情况选择合适的方法进行调试和修复。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [mybatis-plus异常记录:org.apache.ibatis.binding.BindingException Invalid bound statement](https://blog.csdn.net/w1014074794/article/details/125725011)[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%"]
- *3* [springboot 集成 mybatis-plus报错解决:org.apache.ibatis.binding.BindingException: Invalid bound ...](https://blog.csdn.net/big_bigwolf/article/details/120752264)[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 ]
相关推荐
![png](https://img-home.csdnimg.cn/images/20210720083516.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)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)