Mybatis bug 之Invalid bound statement:getBaseMapper
Invalid bound statement: Service.getBaseMapper错误场景:Invalid bound statement (not found): com.mf.api.service.interfaces.OrderStatisticService.getBaseMapperorg.apache.ibatis.binding.BindingException: Inv
·
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文件所在的文件夹路径
改正前:
改正后:
更多推荐
已为社区贡献1条内容
所有评论(0)