Invalid bound statement (not found): mapper.studentsmapper.selectall
时间: 2023-10-15 13:27:58 浏览: 84
MybatisPlus BaseMapper 中的方法全部 Invalid bound statement (not found Error处理)
5星 · 资源好评率100%
对于错误信息"Invalid bound statement (not found): mapper.studentsmapper.selectall",可能是由于以下原因导致的:
1. XML文件未正确放置在mapper文件夹中。请确保将XML文件复制到项目的target/mapper文件夹中,以便正确引用。
2. Java配置文件中的包路径错误。确保在Java配置文件中正确地创建包,并将mapper映射文件放入其中。请注意,建立的包名与mapper接口的包名必须一致。
3. Maven的pom.xml文件中的资源配置不正确。请确认你的pom.xml文件中是否正确配置了资源路径,包括.properties和.xml文件的目录。可以使用以下代码示例作为参考:
```xml
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>
```
请检查以上这些可能导致错误的原因,并进行相应的修正。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Invalid bound statement (not found): mapper.UserMapper.selectUser异常解决](https://blog.csdn.net/qq_55015207/article/details/127621049)[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.itheima.mapper.userMapper.SelectAll](https://blog.csdn.net/weixin_64773406/article/details/127726908)[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 ]
阅读全文