错误原因

maven 打包时会忽略掉 java目录中的 xml 文件 ,所以导致上面错误.

解决

<build>
	 <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
</build>

Q.E.D.


全栈混子的菜鸡日常