Loading

多模块下的mybatis plus配置

  1. application.yaml 配置
mybatis-plus:  
    # 配置要扫描的xml文件目录,classpath* 代表所有模块的resources目录 classpath 不加星号代表当前模块下的resources目录
    mapper-locations: classpath*:/mapper/*.xml
    # 实体扫描,*通配符
    typeAliasesPackage: com.demo.*.entity
  1. 注解
@MapperScan("com.demo.**.mapper")
posted @ 2022-03-11 23:22  超超不会飞  阅读(495)  评论(0编辑  收藏  举报