1.问题
字体文件加载失败,本来应该是“X”号,现在只有一个小方块
原因:问题是Maven正在过滤字体文件并破坏它们。
<resource> <filtering>true</filtering> <directory>src/main/resources</directory> <includes> <include>application-${profileActive}.properties</include> <include>application.properties</include> </includes> </resource>
解决方案:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <nonFilteredFileExtensions> <nonFilteredFileExtension>ttf</nonFilteredFileExtension> <nonFilteredFileExtension>woff</nonFilteredFileExtension> <nonFilteredFileExtension>woff2</nonFilteredFileExtension> </nonFilteredFileExtensions> </configuration> </plugin>
原文地址:https://www.cnblogs.com/rocker-pg/p/9470195.html
时间: 2024-11-06 20:20:08