Spring Boot + Bootstrap 出现"Failed to decode downloaded font"和"OTS parsing error: Failed to convert WOFF 2.0 font to SFNT"
准确来讲,应该是maven项目使用Bootstrap时,出现
"Failed to decode downloaded font"和"OTS parsing error: Failed to convert WOFF 2.0 font to SFNT"
导致图标出不来的问题。
解决方案:
设置filter,font文件不需要filter,见下面示例:
<build>
<finalName>bootstrap in maven</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>static/fonts/**</exclude>
</excludes>
</resource>
<!-- fonts file cannot use filter as the data structure of byte file will be changed via filter -->
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>static/fonts/**</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
...
</build>
原因:
上面的xml里也写了,因为经过maven的filter,会破坏font文件的二进制文件格式,到时前台解析出错。
Spring Boot + Bootstrap 出现"Failed to decode downloaded font"和"OTS parsing error: Failed to convert WOFF 2.0 font to SFNT"的更多相关文章
- 浏览器警告Failed to decode downloaded font和OTS parsing error: Failed to convert *** font to ***
昨晚,在做一个自己感兴趣的东西时,发现浏览器报警告,Failed to decode downloaded font以及OTS parsing error: Failed to convert *** ...
- Spring Boot - Font Awesome OTS parsing error: Failed to convert 字体加载失败
字体文件,加载不出来 解决方案 一 问题是Maven正在过滤字体文件并破坏它们. <resource> <directory>${project.basedir}/src/m ...
- 处理springboot OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
springboot项目中添加了字体等文件后,页面无法识别,浏览器调试窗口报错如下: Failed to decode downloaded font: http://localhost:8080/f ...
- 解决Spring Boot OTS parsing error: Failed to convert WOFF 2.0
<build> <resources> <resource> <directory>${project.basedir}/src/main/resour ...
- chrome浏览器警告:Failed to decode downloaded font:
使用iconfont字体时chrome报错 Failed to decode downloaded font: 在服务器设置一下自己定义MIME类型. 扩展名: .woff Mime类型:applic ...
- Spring Boot + Bootstrap + jQuery + Freemarker
Spring Boot + Bootstrap + jQuery + Freemarker 原文地址:http://qilu.me/post/tech/2018-03-18 最近在写一些Web的东西, ...
- Spring Boot+BootStrap fileInput 多图片上传
一.依赖文件 <link rel="stylesheet" type="text/css" th:href="@{/js/bootstrap/c ...
- Spring Boot 2.x 系列教程:WebFlux REST API 全局异常处理 Error Handling
摘要: 原创出处 https://www.bysocket.com 「公众号:泥瓦匠BYSocket 」欢迎关注和转载,保留摘要,谢谢! 本文内容 为什么要全局异常处理? WebFlux REST 全 ...
- Failed to decode downloaded font
碰到如下错误,该错误是开启layui的打印.导出.筛选列时出现的,不能正常显示图标及文字 原因: @参考文章 因为经过maven的filter,会破坏font文件的二进制文件格式,到时前台解析出错 解 ...
随机推荐
- sql2000添加表注释,列注释 及修改 删除 注释
--创建表--create table 表(a1 varchar(10),a2 char(2)) --为表添加描述信息EXECUTE sp_addextendedproperty 'MS_Descri ...
- Centos下安装Redis
转自:http://nnzhp.cn/article/9/ 遇到问题,安装后并启动,redis-cli报错:Could not connect to Redis at 127.0.0.1:6379: ...
- VideoToolbox硬件编解码H.264视频流错误码
如果你不能找到在VTD中的错误代码我决定只包括他们在这里. (同样,所有这些错误,并更可以在里面VideoToolbox在Project Navigator中找到.本身). 您将获得无论是在VTD中 ...
- ASP.NET Misconfiguration: Request Validation Disabled
Abstract: Use the ASP.NET validation framework to prevent vulnerabilities that result from unchecked ...
- Badboy录制脚本参数化
Jmeter录制脚本多采用Badboy工具 简单参数修改 第一步,先录制场景: a.开始录制,打开浏览器www.sogou.com b.在输入框中输入文字“Badboy" c.回车,关闭录制 ...
- jquery ajax get /post
$.get(URL,callback); $("button").click(function(){ $.get("demo_test.asp",functio ...
- myeclipse ctrl + 鼠标单击 出现 source not found
有时候我们下载来目录中有一个src文件夹,里面是源代码,而不是打包好的jar或zip文件.src目录下的源代码是按照包结构存放的,比如a.java的第一行是package test; 那么在src/t ...
- win8.1 64位安装DEV C++
1.首先下载64位版本的DEV C++ http://sourceforge.net/projects/orwelldevcpp/files/Setup%20Releases/ 2.采取默认安装即可, ...
- Nvelocity用法
NVelocity用法 NVelocity是一个基于.NET的模板引擎(template engine).它允许任何人仅仅简单的使用模板语言(template language)来引用由.NET代码定 ...
- JQuery 常用
1.同一name分组的多个radio,获取选中radio的value值: var check_val=$("input[name='属性名']:checked").val(); 2 ...