扫描自己jar包中的映射文件
application.yml 配置如下
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath:/mapper/*.xml
type-aliases-package: com.chenchen.system.entity
扫描其它jar中的映射文件
微服务中依赖其他jar包,扫描其它jar包中的映射文件
application.yml 配置如下
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:/mapper/*.xml #要扫码到其他jar包中的xml配置文件,classpath后加个*,只自己的无需这个*
type-aliases-package: com.chenchen.system.entity