How to Fix Spring Boot OTS parsing error: Failed to convert WOFF 2.0

In order to facilitate the configuration in the project, often use the properties file save configuration information, project started, need to open maven filtering with the properties of the attribute value replace placeholders in the configuration file, for example, I used in the project of c3p0.. the properties file database connection information, so that every time I need to change the database connection information, only need to modify the c3p0. The properties of the file, Using the ${} read value in mybatis config. XML (see figure below), using maven’s Resource plug-in to turn Filtering on, replaces ${} in the XML file with the contents of Properties at compile time.


When I was using Spring Boot, all the files related to my page were placed in the SRC /resource/ directory. After starting the project, the icon of the page (font-awesome is used) could not be used. I have checked the official document and explained as follows: means that turning on The Filtering function using Maven’s Resource plug-in destroys files with binary content.
According to the official document needs to modify the configuration as follows (this project is an example) :

<resources>
            <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>
        </resources>

Static directory part content:


After the project is compiled, the files will not be corrupted.

Read More: