从服务器下载的字体文件放在本地,执行无法展示iconfont,浏览器控制台报出

Failed to decode downloaded font: http://127.0.0.1:8080/mhr/group-assets/iconfont/iconfont.ttf?t=1500884389272
login_group.html:1 OTS parsing error: invalid version tag 错误。

原因是ttf文件和woff文件被项目所拦截,尽管在静态文件中展示正常。

1. spring安全过滤

spring-security.xml
<sec:http pattern="/**/*.woff" security="none" />
<sec:http pattern="/**/*.tff" security="none" />

2. maven安全过滤

在pom.xml中添加:

<filter>true<filter>变为false;

<build><resources><resource><directory>src/main/resources</directory><filtering>false</filtering><excludes><exclude>public/bower_components/**</exclude><exclude>public/coverage/**</exclude><exclude>public/node_modules/**</exclude></excludes><includes><include>**</include></includes></resource></resources>
</build>

转载于:https://www.cnblogs.com/DennyZhao/p/7232786.html

OTS parsing error: invalid version tag woff和ttf文件被Filter拦截相关推荐

  1. springboot : Failed to decode downloaded font 和 OTS parsing error

    大家好,我是烤鸭: 采坑实录,看了很多人跟我有类似问题,但是都没解决我的问题: Failed to decode downloaded font 和 OTS parsing error: 尝试了把wo ...

  2. Spring Boot + Bootstrap 出现Failed to decode downloaded font和OTS parsing error: Failed to convert W

    转载自:https://www.cnblogs.com/tomcatandjerry/p/5799188.html 准确来讲,应该是maven项目使用Bootstrap时,出现 "Faile ...

  3. Maven — maven filtering OTS parsing error incorrect file size in WOFF head 产生原因及两种解决方案

    背景说明 前端静态资源文件放在后端SpringBoot项目resources文件夹下,多环境打包后前端页面出现了图标及文字未按预期样式显示的情况,查看浏览器控制台发现出现如下错误. OTS parsi ...

  4. 解决springboot报错:OTS parsing error: incorrect file size in WOFF header

    错误问题: 谷歌浏览器 console 中报警告信息: Failed to decode downloaded font: /font/element-icons.woff OTS parsing e ...

  5. Spring Boot - Font Awesome OTS parsing error: Failed to convert( Failed to decode downloaded font)

    解决方法: 14 down vote accepted The issue is that Maven was filtering the font files and corrupting them ...

  6. ESLint报错之 -- Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag

    ESlint Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag (分析错误:相邻的JSX元素必须包装在封 ...

  7. Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragmen

    一.问题描述: error  Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag. Did you wan ...

  8. XML Parsing Error: mismatched tag. Expected

    用Firefox不愧为技术呆子,哪怕是一个HTML标签部规范,都会给出ERROR MESSAGE. Long long ago 习惯用IE开发,自从chrome诞生后,慢慢chrome赶走了IE,偶尔 ...

  9. Netbeans ClassFormatException: Invalid byte tag in

    为什么80%的码农都做不了架构师?>>>    工程启动报错信息: Starting Servlet Engine: Apache Tomcat/7.0.6 org.apache.t ...

最新文章

  1. 泰安虚拟服务器怎么样,一山二虎 泰安双路GT24服务器对比评测
  2. C#实现RSA加密解密
  3. 电脑显示无法连接sql服务器,他人的电脑为什么无法连接我电脑上的sql sever服务器...
  4. java中的垃圾回收机
  5. 韩顺平php视频笔记47 函数使用
  6. * Dijkstra 堆优化
  7. vscode插件之Vetur
  8. 远离魔咒,见微知著,打造崭新的罗浮宫
  9. Cortex-M0详解(2)--寄存器
  10. JavaScript视频教程
  11. 刘晓燕核心词汇趣讲笔记-第十七课
  12. python求三角形斜边-python 已知三条边求三角形的角度案例
  13. 五大地形等高线特征_等高线地形图的判读技巧
  14. < span >标签的使用
  15. 【PC页面设计项目】宠物物流页面设计(源码+图示)
  16. OSPF- P2P网络、NBMA网络和P2MP网络
  17. 戴口罩的这一年,AI产业如何“重启、重塑、重构”?
  18. matlab因子载荷矩阵正交旋转,因素分析中的矩阵旋转
  19. 微信端跳转外部浏览器进行apk文件下载的实现原理及源码
  20. jperf(jperf使用手册)

热门文章

  1. matlab中help所有函数功能的英文翻译
  2. const在函数前与函数后的区别 [转]
  3. iOS环信聊天界面中点击头像和消息的几种状态
  4. FastJson 转换 javaBean 时 null 值被忽略都问题
  5. java基础(十三)-----详解内部类——Java高级开发必须懂的
  6. 医院六级电子病历建设思路及要点
  7. linux学习-awk工具
  8. 删除电脑里的空文件夹
  9. 使用idea创建springboot项目并打成war包发布到weblogic上...
  10. pycharm的安装配置和简单使用