问题版本:bootstrap 4.1.1
使用方式:通过gradle管理依赖
compile group: 'org.webjars', name: 'bootstrap', version: '4.1.1'
页面以text/css方式导入:
<link rel="stylesheet" type="text/css" href="webjars/bootstrap/4.1.1/css/bootstrap.min.css" />
返回格式:application/json
错误内容: Refused to apply style from 'http://localhost:8080/webjars/bootstrap/4.1.1/css/bootstrap.min.css' because its MIME type ('application/json') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
解决方式:bootstrap版本内容改为4.0.0,引用正常