原因:由于idea不会编译src下的java目录下的xml文件,所以找不到xml文件
方案一:在pom.xml中添加如下内容
<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> </resources> </build>
<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> </resources> </build>