mybatis-plus的 mapper.xml 路径配置问题
- 如果引用mybatis-plus-boot-starter 依赖,需要配置 mybatis-plus.mapper-locations
- 如果引用mybatis-plus 依赖,需要配置 mybatis.mapper-locationsmybatis-plus-boot-starter
mybatis-plus-boot-starter
ex: mybatis-plus-boot-starter <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.1.0</version> </dependency>
yml:
mybatis-plus:
mapper-locations: classpath*:mapper/*.xml