Mybatis bug 之Invalid bound statement:getBaseMapper

Mybatis bug 之Invalid bound statement:getBaseMapper,第1张

Mybatis bug 之Invalid bound statement:getBaseMapper

Invalid bound statement: Service.getbaseMapper

错误场景:
Invalid bound statement (not found): com.mf.api.service.interfaces.OrderStatisticService.getbaseMapper
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.mf.api.service.interfaces.OrderStatisticService.getbaseMapper
at org.apache.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:235)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.(MybatisMapperMethod.java:51)

解决办法:在SpringBoot的启动类上明确的指出Mapper的Java代码所有包路径。不能只是大概范围,要具体到Mapper文件所在的文件夹路径

改正前:


改正后:

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/3982961.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-10-21
下一篇 2022-10-21

发表评论

登录后才能评论

评论列表(0条)

保存