Failed to decode downloaded font: http:
//localhost:8080/fonts/fontawesome-webfont.woff?v=4.4.0
OTS parsing error: incorrect file size
in
WOFF header
Failed to decode downloaded font: http:
//localhost:8080/fonts/fontawesome-webfont.ttf?v=4.4.0
OTS parsing error: incorrect entrySelector
for
table directory
maven打包項目的時候pom.xml配置文件裏可以配置對項目進行統一編碼,但是部分文件 可能不需要進行重新編碼,例如: 證書文件;重新編碼後可能導致證書不可用。
需要過濾掉不需要編碼的文件:過濾後綴爲.crt或者.p8或者是其他的字體文件的所有文件,不對其進行統一編碼。
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
</configuration>
</plugin>
<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>