我在 Spring Boot 项目中将 css 链接到 html 时遇到问题

问题描述 投票:0回答:1

HTML代码:

我已经尝试了一切将

style.css
链接到
products.ftlh
(ftlh是apace freemarker) 我无法解决这个问题。我需要帮助。我在开发者页面中注意到此错误:

Refused to apply style from 'http://localhost:8080/login' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

我尝试更改

link
标签。

java html css spring spring-boot
1个回答
0
投票

不应该指定从资源文件夹开始的文件路径吗? “静态/css/style.css”

© www.soinside.com 2019 - 2024. All rights reserved.