diff --git a/module/spring-boot-security-oauth2-resource-server/src/main/java/org/springframework/boot/security/oauth2/server/resource/autoconfigure/OAuth2ResourceServerProperties.java b/module/spring-boot-security-oauth2-resource-server/src/main/java/org/springframework/boot/security/oauth2/server/resource/autoconfigure/OAuth2ResourceServerProperties.java index 531a8d448b64..428cfedec073 100644 --- a/module/spring-boot-security-oauth2-resource-server/src/main/java/org/springframework/boot/security/oauth2/server/resource/autoconfigure/OAuth2ResourceServerProperties.java +++ b/module/spring-boot-security-oauth2-resource-server/src/main/java/org/springframework/boot/security/oauth2/server/resource/autoconfigure/OAuth2ResourceServerProperties.java @@ -35,6 +35,7 @@ * @author Artsiom Yudovin * @author Mushtaq Ahmed * @author Yan Kardziyaka + * @author Yanming Zhou * @since 4.0.0 */ @ConfigurationProperties("spring.security.oauth2.resourceserver") @@ -173,7 +174,7 @@ public void setPrincipalClaimName(String principalClaimName) { } public String readPublicKey() throws IOException { - String key = "spring.security.oauth2.resourceserver.public-key-location"; + String key = "spring.security.oauth2.resourceserver.jwt.public-key-location"; if (this.publicKeyLocation == null) { throw new InvalidConfigurationPropertyValueException(key, this.publicKeyLocation, "No public key location specified");