1 在文件中加上:
<!--加载XML文件,这样才能读到SQL语句-->
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
2 在文件中加上:
#配置mapper xml文件的路径
mybatis-plus.mapper-locations=classpath:com/atguigu/educenter/mapper/xml/*.xml
以上两步都完成之后就能读取Mapper文件中的SQL语句了