SpringBoot 配置 mapper.xml 文件指定

1. 引入依赖

<dependency>
  <groupId>com.baomidou</groupId>
  <artifactId>mybatis-plus-boot-starter</artifactId>
  <version>3.4.1</version>
</dependency>

2. application.yml 配置

具体写入配置

mybatis-plus:
  mapper-locations: classpath:com/suke/srb/core/mapper/xml/*.xml

简写配置 

mybatis-plus:
  mapper-locations: classpath:/mapper/*.xml

猜你喜欢

转载自blog.csdn.net/qq_45037155/article/details/129780264