java如何将项目的 excel文件编译到target/classes文件中
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-xmls</id>
<phase>process-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>{basedir}/src/main/resources</directory>
<includes>
<include>.properties</include>
<include>/web/</include>
<include>*.xlsx</include>//这行
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
ExcelUtil.getRootPath()地址指的是target/classes文件夹路径
网友评论