【发布时间】:2021-02-26 19:40:20
【问题描述】:
我在尝试运行 ResourceServer 时遇到此错误,它抱怨:http://localhost:8080/auth/realms/xxxnapp/protocol/openid-connect/certs 因为它没有协议
在创建名称为“jwtDecoderByJwkKeySetUri”的 bean 时出错 类路径资源 [org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerJwtConfiguration$JwtDecoderConfiguration.class]: 通过工厂方法实例化 Bean 失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:失败 实例化 [org.springframework.security.oauth2.jwt.JwtDecoder]: 工厂方法“jwtDecoderByJwkKeySetUri”抛出异常;嵌套的 异常是 java.lang.IllegalArgumentException: Invalid JWK Set URL "= http://localhost:8080/auth/realms/xxxnapp/protocol/openid-connect/certs" :没有协议:= http://localhost:8080/auth/realms/xxxnapp/protocol/openid-connect/certs
知道我是如何克服这个错误的。
【问题讨论】:
-
您的 URL 开头似乎有一个额外的“=”。您可以将您的 application.properties 文件添加到您的问题中吗?
标签: java spring spring-boot spring-security spring-security-oauth2