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文件的二进制文件格式,到时前台解析出错 解 ...
随机推荐
- ActiveMQ安装
安装环境: 逛网下载最新安装包,ubuntu下解压sudo tar -zxvf xx.tar.启动activeMQ. 报错如下: 原因是没有找到java命令位置,编辑启动配置文件: 再次启动,完成后进 ...
- 设置MYECLIPSE的自动补全
http://jingyan.baidu.com/article/d169e1869caf1e436611d8db.html
- linux下dos环境和unix环境转换
DOS转UNIX::setfileformat=unix UNIX转DOS::setfileformat=dos and :set ff=unix
- 巧用vsprintf将浮点数等转化字符串
直接上代码 #include <stdarg.h> ]; int vspf(char *fmt, ...) { va_list argptr; int cnt; va_start(argp ...
- 转载:reactor模式学习
最近又重新看了下netty背后的设计思想,接触到了reactor模型.发现以前虽然也看过reactor和proactor模型的介绍,但是真的是只了解了个皮毛. 再重新学习了一遍,有了更深刻的认识.但是 ...
- 浅述python中argsort()函数的用法
由于想使用python用训练好的caffemodel来对很多图片进行批处理分类,学习过程中,碰到了argsort函数,因此去查了相关文献,也自己在python环境下进行了测试,大概了解了其相关的用处, ...
- Android SDK的安装与环境变量配置
配置Andriod环境变量前提是要先安装好JAVA环境 1.下载Android SDK,点击安装,直接默认路径即可! 下载地址:http://developer.android.com/sdk/ind ...
- 最简单的Github入门基础
起因是小伙伴分享给我github上的一个FQ工具,让我看实现过程.于是,就由关键字"github"搜索开始. 一言之,是个开源的SVN.和CVS.SVN类似,但是,里面有千千万万程 ...
- php后台权限管理
今天新到一家公司,重新维护升级了之前的权限管理. 权限管理思路:1.三张表(公司项目比较复杂,所以数据表远比这个复杂,这里只实现权限管理,简化一下)action表------权限大菜单:这个表没有实际 ...
- Office 365系列六 ------ 创建sharepoint online网站
这节跟大家介绍简单的创建sharep online私有网站集,sharepoint online 可以给我们提供开箱即用的功能,比如文档库:可以给我们取代File Server,提供了版本管理,版本变 ...