idea的默认是不加载java文件下的所以我们要手动添加,加载java文件到pom文件下,在build中添加
<resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource>