从服务器下载的字体文件放在本地,执行无法展示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>

OTS parsing error: invalid version tag woff和ttf文件被Filter拦截的更多相关文章

  1. 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: ...

  2. 处理springboot OTS parsing error: Failed to convert WOFF 2.0 font to SFNT

    springboot项目中添加了字体等文件后,页面无法识别,浏览器调试窗口报错如下: Failed to decode downloaded font: http://localhost:8080/f ...

  3. 解决Spring Boot OTS parsing error: Failed to convert WOFF 2.0

    <build> <resources> <resource> <directory>${project.basedir}/src/main/resour ...

  4. 解决访问 jar 包里面的字体报错:OTS parsing error: incorrect file size in WOFF header

    前言:jar 包里面的字体加载,浏览器 console 中报警告信息,这里记录一下解决方案. 附:自己的一个 jar 包源码 https://github.com/yuleGH/querydb 错误问 ...

  5. 浏览器警告Failed to decode downloaded font和OTS parsing error: Failed to convert *** font to ***

    昨晚,在做一个自己感兴趣的东西时,发现浏览器报警告,Failed to decode downloaded font以及OTS parsing error: Failed to convert *** ...

  6. Spring Boot - Font Awesome OTS parsing error: Failed to convert 字体加载失败

    字体文件,加载不出来 解决方案  一 问题是Maven正在过滤字体文件并破坏它们. <resource> <directory>${project.basedir}/src/m ...

  7. 问题:编译eshoponcontainers失败,提示error:invalid reference format

    环境: visual studio 2017 v15.4.2,docker ce Version 17.06.0-ce-win19 (12801) 参考问题页: https://github.com/ ...

  8. Invalid byte tag in constant pool: 19 与 javax/el/ELManager问题解决

    整个生产环境采用JDK1.8 + Tomcat 7.0.65 代码重构后,启动报错,主要异常如下: 严重: Unable to process Jar entry [module-info.class ...

  9. tomcat部署新的项目的时候出现报错信息: Invalid byte tag in constant pool: 15

    上面一堆tomcat启动的提示信息省略掉,下面是报错的具体信息:org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid ...

随机推荐

  1. day27 python学习 logging

    logging模块 函数式简单配置 import logging logging.debug('debug message') logging.info('info message') logging ...

  2. dbt seed 以及base ephemeral使用

    seed 可以方便的进行数据的导入,可以方便的进行不变数据(少量)以及测试数据的导入, base 设置为 ephemeral(暂态),这个同时也是官方最佳实践的建议 项目依赖的gitlab 数据可以参 ...

  3. ASP.NET vNext:微软下一代云环境Web开发框架

    作者 郭蕾 发布于 2014年5月16日   在5月12日的TechED大会上,微软首次向外界介绍了下一代ASP.NET框架——ASP.NET vNext.ASP.NET vNext专门针对云环境和服 ...

  4. web 纯 javascript 的MVC 实现的简单实践

    现在javascript是越来越火了,好多javascript框架随之产生,大大简化了我们的开发,一般的开发模式大家是比较喜欢MVC 的model controller view 这种模式 方便了我们 ...

  5. sqlserver中numeric字段截取

    方法一:convert(float,字段名) as 别名 select convert(float,round(10.123232,2)) 结果:10.12 select convert(float, ...

  6. JAVA关闭钩子

    JAVA的关闭钩子: 1. 一般应用程序在关闭时都需要做一些善后清理工作,但是用户并不会总是按照推荐的方法关闭应用程序,比如用户直接关闭控制台程序或者按下Ctrl+C结束应用程序,这样就导致清理工作得 ...

  7. JUC集合之 JUC中的集合类

    Java集合包 在"Java 集合系列01之 总体框架"中,介绍java集合的架构.主体内容包括Collection集合和Map类:而Collection集合又可以划分为List( ...

  8. Ionic 安装最新版本错误

    更新Ionic版本时 npm i -g ionic@latest 出现如下错误 npm ERR! Unexpected end of input at 1:14782 如下图 解决方法 使用如下命令: ...

  9. JZ2440 裸机驱动 第7章 内存管理单元MMU

    本章目标:     了解虚拟地址和物理地址的关系:     掌握如何通过设置MMU来控制虚拟地址到物理地址的转化:     了解MMU的内存访问权限机制:     了解TLB.Cache.Write ...

  10. SQL 实践和技巧 <2>

    转自   http://i.cnblogs.com/EditPosts.aspx?opt=1 几个小技巧   (1)||的使用: select ‘(‘||phone[1,3]||’)’phone[5, ...