原因:由于idea不会编译src下的java目录下的xml文件,所以找不到xml文件

方案一:在pom.xml中添加如下内容

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

方案二:把xml文件放在resources目录下

相关文章:

  • 2021-08-11
  • 2021-04-26
  • 2022-12-23
  • 2021-11-30
  • 2021-07-20
  • 2022-02-20
  • 2021-06-20
猜你喜欢
  • 2022-12-23
  • 2021-06-18
  • 2022-02-07
  • 2021-07-17
  • 2021-07-13
  • 2021-08-27
  • 2022-01-07
相关资源
相似解决方案