解决这个问题很简单,只要在pom文件的<bulid>节点下面加入如下代码
<resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources>
就可以将xml文件放到Java目录下了
时间: 2024-12-17 02:05:29