如果不想將接口和mapper文件分別放到src/main/java
和src/main/resources
中,
而是全部放到src/main/java
,那么在構建的時候需要指定maven打包需要包括xml文件,
具體配置如下:
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>