【发布时间】:2019-02-10 08:46:25
【问题描述】:
我是 Spring Boot 和 Spring Security 的新手。在这里,我尝试使用 thymeleaf 运行 Spring Boot Web 应用程序,但是当我尝试在未加载 CSS 的浏览器页面中点击 url 时。
在 Firefox 中显示以下警告
Strict-Transport-Security: The connection to the site is untrustworthy, so the specified header was ignored.
Loading failed for the <script> with source “https://localhost:xxxx/assets/bootstrap/js/bootstrap.min.js”.
在 Chrome 下面显示错误
Refused to apply style from 'https://localhost:xxxx/assets/dist/css/login.css' because its MIME type ('application/json') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Refused to apply style from 'https://localhost:xxxx/assets/bootstrap/css/bootstrap.min.css' because its MIME type ('application/json') is not a supported stylesheet MIME type, and strict MIME checking is enabled
我的应用程序出了什么问题。
【问题讨论】:
-
@Alien 它与我的问题无关
-
我猜你的样式表的传递被spring security阻止了,浏览器收到了某种错误消息。尝试在浏览器中打开样式表。
-
@Flocke 在浏览器中哪里可以使用?
-
@Durga 在浏览器中打开页面,然后打开源代码视图(右键单击,类似于“源代码视图”)。在那里你会发现像
标签: spring-boot spring-security thymeleaf