mybatisPlus报orq.apache ibatisbinding.BindingException: Invalid bound statement (not found)错误

 出现这种问题依次检查下列内容

1.检查xml映射文件中标签绑定包名地址是否正确(即namespace的值)
2.检查xxxMapper接口中的方法,对应xml映射文件中是否有
3.检查标签中的resultType是否与xxxMapper接口中的方法返回值类型一致,若一个是对象一个是集合,那也会报错~
4.检查yml配置文件中的mybatis配置

最终经过排查发现mybatis plus 配置的不对

# mybatis 配置
mybatis:
configLocation: classpath:mybatis/mybatis-config.xml
mapperLocations: classpath:mybatis/mapper/*.xml
typeAliasesPackage: com.owinfo.service

修改为:

# mybatis 配置
mybatis-plus:
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations:
- classpath:mybatis/mapper/*.xml
- classpath*:shared/mapper/*.xml
type-aliases-package: com.owinfo.service.core.entity

 

posted on   qqq9527  阅读(87)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示