我使用“ maven-remote-resources-plugin”共享资源
但是,现在将文件放在“ web-inf”文件夹中,
我知道,“ web-inf”无法访问。
如何将文件放入src / main / webapp文件夹?
子女父母POM
enter image description here
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.5</version>
<configuration>
<resourceBundles>
<resourceBundle>test:a-resources:${project.version}</resourceBundle>
</resourceBundles>
<outputdirectory>/</outputdirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
孩子A POM
enter image description here
<plugins>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
<configuration>
<resourcesDirectory>${project.build.outputDirectory}</resourcesDirectory>
<includes>
<include>**/*.json</include>
</includes>
</configuration>
</plugin>
src / main / webapp
-页面
--index.html
---java.class