springBoot+thymeleaf遇到Resource interpreted as Stylesheet but transferred with MIME type text/plain

如果你在项目中使用了拦截器,那么你的拦截器配置就应该排除拦截css静态资源,如下图所示:

这样浏览器控制台上就不会出现Resource interpreted as Stylesheet but transferred with MIME type text/plain提示了,页面也能恢复正常了。

猜你喜欢

转载自www.cnblogs.com/JerryTomcat/p/11721258.html