diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/OAuth2ResourceServerProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/OAuth2ResourceServerProperties.java index 26e53dd08aa..65a3e357d01 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/OAuth2ResourceServerProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/OAuth2ResourceServerProperties.java @@ -35,6 +35,7 @@ import org.springframework.util.StreamUtils; * @author Artsiom Yudovin * @author Mushtaq Ahmed * @author Yan Kardziyaka + * @author Yanming Zhou * @since 2.1.0 */ @ConfigurationProperties("spring.security.oauth2.resourceserver") @@ -173,7 +174,7 @@ public class OAuth2ResourceServerProperties { } 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");