项目结构
App.jar
├─j1.jar
├─j2.jar
└─j3.jar
问题:在SpringBoot 只能扫描到App.jar下的mapper 扫描不到依赖 j1.jar 等的mapper
解决方法: 在appliacation.yml中
mybatis:
mapper-locations: classpath:mapper/*.xml 改为 classpath*:mapper/*.xml
classpath*扫描所有jar包下的路径
项目结构
App.jar
├─j1.jar
├─j2.jar
└─j3.jar
问题:在SpringBoot 只能扫描到App.jar下的mapper 扫描不到依赖 j1.jar 等的mapper
解决方法: 在appliacation.yml中
mybatis:
mapper-locations: classpath:mapper/*.xml 改为 classpath*:mapper/*.xml
classpath*扫描所有jar包下的路径
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。