idea启动springboot项目, resources文件不编译, 放到src的xml文件也不编译
一开始我的pom文件里放加了配置信息如下, 刚开始还可以,正常编译recourse的xml文件, 后来死活不行, 编译进去, 每次都要手动执行maven插件的install
<!-该配置信息无法编译resources文件->
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
</resource>
</resources>
然后网上查找相关信息尝试修改为以下配置,就可以自动编译了,无需install
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
resources文件编译进去classes
还有一个情况, 就是我每次修改mapper.xml文件, classes编译目录下会把我修改的那个mapper.xml文件删除,
尝试rebuild Project 竟然好了