从服务器下载的字体文件放在本地,执行无法展示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. solr学习二(ExtractingRequestHandler)

    通过ExtractingRequestHandler,slor能够读取word.pdf等文件,并用于全文搜索.废话少说,进入主题:     solr服务端是配出来的:     solrconfig.x ...

  2. leetcode:Path Sum【Python版】

    1.类中递归调用函数需要加self # Definition for a binary tree node # class TreeNode: # def __init__(self, x): # s ...

  3. 几本不错的graphql 电子书

    当前专门讲graphql 的数据不是很多,但是越来越多的graphql 项目的出现以及graphql 自身的 便捷,老外已经有人去写graphql 的设计以及基本使用了. ebooks 地址 http ...

  4. C# 线程会合实例

    有这样一个题目:四个线程t1,t2,t3,t4,向4个文件中写入数据,要求:t1只能写入“1”,t2只能写入“2”,t3只能写入“3”,t4只能写入“4”,对4个文件A,B,C,D写入如下内容: A: ...

  5. Msmq设计文档(赋源代码)

    Msmq设计文档(赋源代码)   Msmq设计文档     文件状态: [√] 草稿 [  ] 正式发布 [  ] 正在修改 文件标识: ECI-MSMQ v01 当前版本: 0.5 作    者: ...

  6. ThinkPHP 5 insertall 只插入最后一条数据的问题

    问题来源: Steed 2018/1/5 11:30:25 @流年 我用fetchsql查看的sql,发现数据都是最后一条 Steed 2018/1/5 11:30:39 我也不知道是什么问题,我打印 ...

  7. 基于TLS(线程局部存储)的高效timelog实现

    什么是timelog? 我们在分析程序性能的时候,会加入的一些logging信息记录每一部分的时间信息 timelog模块的功能就是提供统一的接口来允许添加和保存logging 我们正在用的timel ...

  8. 【python】网络编程-TCP协议套接字

    服务器端: #!/usr/bin/env python from socket import * from time import ctime HOST = '' PORT = 21567 BUFSI ...

  9. Netty源码分析之NioEventLoop(一)—NioEventLoop的创建

    一.NioEventLoop的概述 NioEventLoop做为Netty线程模型的核心部分,从本质上讲是一个事件循环执行器,每个NioEventLoop都会绑定一个对应的线程通过一个for(;;)循 ...

  10. 1、zookeeper集群安装

    前提准备3台centos7.0虚拟机 c7003:192.168.70.103 c7004:192.168.70.104 c7005:192.168.70.105 并在三台虚拟机上配置hosts为 1 ...