Failed to decode downloaded font

碰到如下错误,该错误是开启layui的打印、导出、筛选列时出现的,不能正常显示图标及文字

Failed to decode downloaded font

原因:

@参考文章

因为经过maven的filter,会破坏font文件的二进制文件格式,到时前台解析出错

解决办法:

去除对.tff和.woff的拦截即可

springmvc.xml:

    <mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**" />
<mvc:exclude-mapping path="/**/fonts/*" />
<mvc:exclude-mapping path="/**/*.css" />
<mvc:exclude-mapping path="/**/*.js" />
<mvc:exclude-mapping path="/**/*.png" />
<mvc:exclude-mapping path="/**/*.gif" />
<mvc:exclude-mapping path="/**/*.jpg" />
<mvc:exclude-mapping path="/**/*.jpeg" />
<mvc:exclude-mapping path="/**/*.ttf" />
<mvc:exclude-mapping path="/**/*.woff" />
</mvc:interceptor>
</mvc:interceptors>
上一篇:数据分页SQL语句的比较


下一篇:Log4j2中的同步日志与异步日志