我试图使用本地字体在html中应用样式,下面是代码。字体未应用于harlow类的使用元素
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: myFirstFont;
src:local("C:\Users\Website\fonts\Harlow_Solid_Italic.ttf");
}
.harlow{
font-family: myFirstFont;
}
</style>
</head>
<body>
<div>With CSS3, websites can finally use fonts other than the pre selected "web-safe" fonts.</div>
<p><b class="harlow">Note:</b> Internet Explorer 8 and earlier, do not support the @font-face rule with the WOFF format (only support for EOT format).</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 使用 Spring Boot OAuth 资源服务器入门项目,版本 - 2.4.4。我收到以下异常,我在代码中找不到太多问题,因为它在我们的 preprod env 中运行良好,但在 prod 环境中不起作用
观察到目前为止,
我已经检查过,并想确认child 是否从 jwk uri 收到并且Kid收到的token不一样,那么有可能出现这个异常吗?注意,kid 与 pre-prod 环境中的 token 和 jwk uri 相同。
来自 jwk uri -
来自 jwt 标头-

查看了这段代码,了解密钥 ID 检查片段,第 253 行 .. 但我无法进一步理解它。
com.nimbusds.jose.proc.BadJOSEException: Signed JWT rejected: Another algorithm expected, or no matching key(s) found
at com.nimbusds.jwt.proc.DefaultJWTProcessor.process(DefaultJWTProcessor.java:384) ~[nimbus-jose-jwt-8.20.2.jar:8.20.2]
at com.nimbusds.jwt.proc.DefaultJWTProcessor.process(DefaultJWTProcessor.java:330) ~[nimbus-jose-jwt-8.20.2.jar:8.20.2]
at org.springframework.security.oauth2.jwt.NimbusJwtDecoder.createJwt(NimbusJwtDecoder.java:153) ~[spring-security-oauth2-jose-5.4.5.jar:5.4.5]
Run Code Online (Sandbox Code Playgroud) 我需要从 spring boot war 外部加载 application.properties 文件,该文件将部署在 tomcat 中。
\n\n我尝试了各种解决方案,缺少一些东西
\n\n尝试在Windows中设置环境变量如下
\n\n名称:SPRING_CONFIG_NAME\n值:D:/test/application.properties
我尝试了上述值的多个值,例如前缀中的 file:/// 和仅 file: 作为前缀。没有任何效果
\n\n尝试将上下文参数设置为 tomcat,如下所示,所以答案\n /sf/answers/3128806761/
尝试在扩展 SpringBootServletIntializer 的主文件中像这样加载
\n\nprotected SpringApplicationBuilder configure(SpringApplicationBuilder application) {\n return application.sources(Application.class)\n .properties(getProperties());\n }
\n\n public static void main(String[] args) throws Exception {\n SpringApplication.run(Application.class, args);\n\n SpringApplicationBuilder springApplicationBuilder = (SpringApplicationBuilder) (new SpringApplicationBuilder(Application.class))\n .sources(Application.class)\n .properties(getProperties())\n .run(args);\n\n\n }\n\n static Properties getProperties() {\n Properties props = new Properties();\n props.put("spring.config.location", "file:///D:/test/application.properties\xe2\x80\x8b");\n return props;\n }\nRun Code Online (Sandbox Code Playgroud)我不确定我错过了什么,请帮忙。 …