我们最近的项目是java web项目,前端采用了fontawesome-webfont,项目部署之后,图标都显示不出来,在网上学习了一大圈,找到了一个解决方案可行:
web.xml中配置
<mime-mapping >
<extension >woff</extension>
<mime-type >application/x-font- woff</ mime-type>
</mime-mapping >
<mime-mapping >
<extension >ttf</extension>
<mime-type >application/ octet-stream</mime-type >
</mime-mapping >
<mime-mapping >
<extension >otf</extension>
<mime-type >application/ octet-stream</mime-type >
</mime-mapping >
时间: 2024-10-03 22:54:07