Maven中资源文件读取失败,找不到路径的解决方法

在pom.xml文件中配置resources,防止资源导出失败

<build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>**/*.properties</exclude>
          <exclude>**/*.xml</exclude>
        </excludes>
        <filtering>false</filtering>
      </resource>
      <resource>
        <directory>src/main/java</directory>
        <excludes>
          <exclude>**/*.properties</exclude>
          <exclude>**/*.xml</exclude>
        </excludes>
        <filtering>false</filtering>
      </resource>
    </resources>
  </build>

 


版权声明:本文为qq_47759220原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。