Invalid bound statement (not found): com.example.mapper.StudentMapper.findByPage
时间: 2024-05-29 22:07:39 浏览: 163
Invalid bound statement (not found): com.example.mapper.StudentMapper.findByPage通常意味着在MyBatis的Mapper XML文件中找不到对应的SQL语句。请检查StudentMapper.xml文件,确保已经正确地定义了findByPage语句。此外,还需要确保在对应的Java接口文件StudentMapper.java中有对应的方法声明。如果这些都没有问题,可能是MyBatis配置或者映射文件位置的问题,请检查是否正确配置了MyBatis和Mapper XML文件的路径。
相关问题
Invalid bound statement (not found): com.example.demo.mapper.StudentMapper.selectPage
在解决这个问题时,我们需要参考多个引用内容。首先,我们可以看到引用提到了BaseMapper使用了范型。这意味着我们的UserMapper在继承BaseMapper时也需要写上对应的范型。接下来,引用给出了解决方案之一,即创建Mapper.xml文件时需要注意一些细节。最后,引用给出了另一个解决方案,即在pom.xml文件中添加一些配置来指定mapper.xml文件的位置。
所以,对于你提到的错误信息"Invalid bound statement (not found): com.example.demo.mapper.StudentMapper.selectPage",可能是由于在StudentMapper中的selectPage方法没有正确映射到对应的mapper.xml文件中引起的。你可以检查一下是否在StudentMapper.xml文件中正确配置了selectPage方法。同时,也要确保你的UserMapper正确继承了BaseMapper,并且写上了对应的范型。
另外,你也可以尝试参考引用和中的解决方案来解决这个问题。通过注意创建Mapper.xml文件的细节和在pom.xml文件中添加相关配置,可能会有助于解决该错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [mybatis-plus出错:Invalid bound statement (not found): com.kuang.mapper.UserMapper.selectList](https://blog.csdn.net/fuqiang133/article/details/126943324)[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* [ idea Mapper .XML 文件没有构建成功:Invalid bound statement (not found): com.example.xx项目.mapper](https://blog.csdn.net/weixin_47068543/article/details/124921824)[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.example.demo.mapper.StudentMapper.findChosenNo
这个报错意思是,无效的绑定语句(未找到):com.example.demo.mapper.StudentMapper.findChosenNo。这通常出现在MyBatis Mapper XML文件中,表示无法找到与绑定语句名称匹配的具体方法或 SQL 查询语句。可能原因包括拼写错误、XML文件没有正确加载等。你可以检查代码,确保绑定语句名称正确,并检查是否正确加载XML文件。
阅读全文
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.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)