Font files, loading not out
Solution One
The problem is that Maven is filtering font files and destroying them.
<resource> <directory>${project.basedir}/src/main/resources</directory> <filtering>true</filtering> </resource>
The workaround is to make the following changespom.xml
<resource> <directory>${project.basedir}/src/main/resources</directory> <filtering>True</filtering> <excludes> <exclude>static/fonts/**</exclude> </excludes> </resource>< Span class= "PLN" > <resource> <directory>${project.basedir}/src/main/resources</directory> <filtering>false</filtering> span class= "tag" ><includes> <include>static/ Fonts/**</include> </includes> </RESOURCE>
This change allows fonts to not be filtered during packaging.
Solution II
Another way is to update the configuration of the Maven-resources-plugin as follows:
<plugin> <groupId>Org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactid><configuration> <nonfilteredfileextensions>< Span class= "PLN" > <nonfilteredfileextension>ttf</ Nonfilteredfileextension> <nonfilteredfileextension> woff</nonfilteredfileextension> <nonfilteredfileextension>woff2</nonfilteredfileextension>< Span class= "PLN" > </nonfilteredfileextensions> </ Configuration></PLUGIN>
This article refers to Https://stackoverflow.com/questions/34037051/spring-boot-font-awesome-ots-parsing-error-failed-to-convert
Domestic find long time find, finally found in StackOverflow solution
Spring boot-font Awesome OTS parsing error:failed to convert font load failed