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>