一、mybatisplus只在yml中配置了mapper的路径扫面不够
mapper-locations: classpath:com/jack/shale_porosity/mapper/xml/*.xml
这样只有mybatis自带的basemapper可以用。target文件中并不会加载mapper文件。
二、在pom.xml文件中再配置一次mapper文件扫描路径
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>