項目結構
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包下的路徑