从服务器下载的字体文件放在本地,执行无法展示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. Unity3D 4.x怎样实现动画的Ping Pong效果

    近期在看Unity官方的Stealth项目教学视频,视频使用的是Unity旧的版本号,而我如今正在使用的是Unity 4.5,动画系统的操作全然不同了. 依照视频的方式根本无法设置动画的Ping Pi ...

  2. python、java大作战,python测试dubbo接口

    很多小伙伴都反映公司要求测dubbo(dubbo是一个java的分布式开源框架)接口,不会写java代码,怎么测,能不能用python来调dubbo接口.当然是可以的了,最近研究了一下,很简单,分享给 ...

  3. RabbitMQ客户端负载均衡算法

    负载均衡(Load balance)是一种计算机网络技术,用于在多个计算机(计算机集群).网络连接.CPU.磁盘驱动器或其他资源中分配负载,以达到最佳资源使用.最大化吞吐率.最小响应时间以及避免过载的 ...

  4. 前端可视化建模技术概览,包括:GoJS

    我推荐使用的: 库 网址 备注 GoJS https://gojs.net/latest/samples/flowchart.html 推荐使用 相关文章: 前端可视化建模技术概览:http://le ...

  5. Linux 命令英文全称

    Linux 命令英文全称 linux 命令 英文全称 sudo superuser do su swith user df Disk free,空余硬盘 du Disk usage,硬盘使用率 noh ...

  6. jwt 的使用

    jwt 是什么 ?   json web token  的 简称,是一种无状态的 认证机制 原理:客户端 向服务器端请求一个 jwt 生成的 token ,这个token 带有 一些信息,下次 客户端 ...

  7. Hadoop集群搭建笔记

    1.安装虚拟机 VMware workstation CentOS 镜像 安装Linux虚拟机:(在Win7上) 1)安装VMwareWorkstations(可修改配置) 2)添加CentOS镜像( ...

  8. ES(4): ES Cluster Security Settings

    目录: ES安全事件回顾 ES集群安全建议 安全访问配置 license更新 ES安全事件回顾 下面是白帽汇监测到针对全球使用广泛的全文索引引擎Elasticsearch的勒索事件: 2017年1月1 ...

  9. WPF Demo3

    <Window x:Class="Demo3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/ ...

  10. mysql联表查询

    2.1 内连接 select a.*,b.* FROM  a INNER join  b  ON a.id = b.id;  查出所有 或者 select a.*,b.* FROM a join b ...