<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
</build>
spring
如已有build和plugins標籤,則將plugin放在plugins標籤的裏面apache
或者使用以下配置maven
<resource> <directory>${project.basedir}/src/main/resources</directory> <filtering>true</filtering> <excludes> <exclude>static/fonts/**</exclude> </excludes> </resource> <resource> <directory>${project.basedir}/src/main/resources</directory> <filtering>false</filtering> <includes> <include>static/fonts/**</include> </includes> </resource>