Invalid bound statement (not found): com.example.mapper.TestMapper.getAllThs
时间: 2023-08-27 16:15:03 浏览: 154
MybatisPlus BaseMapper 中的方法全部 Invalid bound statement (not found Error处理)
5星 · 资源好评率100%
根据引用和引用,"Invalid bound statement (not found): com.example.mapper.TestMapper.getAllThs"错误通常是由于找不到mapper接口中的方法引起的。一种可能的原因是mapper接口的方法名与mapper.xml中定义的statement id不一致。另一种可能的原因是mapper.xml文件没有正确配置在项目中。你可以检查mapper接口的方法名是否与mapper.xml中的statement id匹配,并确保mapper.xml文件正确地配置在项目中。如果使用Spring Boot和MyBatis,你可以参考引用中的示例,在application.properties(或application.yml)文件中配置mybatis.mapper-locations属性,指定mapper.xml文件的位置。同时,可以在启动Spring Boot对象上添加@MapperScan注解,指定mapper接口的扫描路径。这样,当项目启动时,MyBatis就能够正确找到mapper接口和对应的mapper.xml文件。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Invalid bound statement (not found): com.example.demo.mapper.-Mapper.getUser service层链接mapper层...](https://blog.csdn.net/weixin_44384605/article/details/122602232)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Invalid bound statement (not found): com.example.store.mapper.UserMapper.insert](https://blog.csdn.net/qq_45953233/article/details/122664328)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Invalid bound statement (not found): com.example.demo.mapper.getUser.](https://blog.csdn.net/xxpxxpoo8/article/details/127548543)[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^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文