resources文件中的配置文件无法加载到target中,可能是pom文件配置出问题了
加入
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
如果还是没有效果的话试一下修改maven配置文件的项目发行方式
值为jar或者war是会编译resources配置
值为pom则并不会去编译resources文件
<packaging>jar</packaging>