mybatis-plus的xml放置src/main/java路径下导致找不到文件,无效的绑定
mybatis-plus: mapper-locations: classpath*:/com/cmtt/pas/**/mapper/*.xml
pom修改
<build> <resources> <resource> <directory>${basedir}/src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> <resource> <directory>${basedir}/src/main/resources</directory> </resource> </resources> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>
完事