diff --git a/servlet/spring-boot/java/oauth2/restclient/src/main/java/example/RestClientConfiguration.java b/servlet/spring-boot/java/oauth2/restclient/src/main/java/example/RestClientConfiguration.java index acc78709..5ab0e4d6 100644 --- a/servlet/spring-boot/java/oauth2/restclient/src/main/java/example/RestClientConfiguration.java +++ b/servlet/spring-boot/java/oauth2/restclient/src/main/java/example/RestClientConfiguration.java @@ -48,7 +48,8 @@ public RestClient restClient(OAuth2AuthorizedClientManager authorizedClientManag RestClient.Builder builder) { OAuth2ClientHttpRequestInterceptor requestInterceptor = new OAuth2ClientHttpRequestInterceptor( - authorizedClientManager, clientRegistrationIdResolver); + authorizedClientManager); + requestInterceptor.setClientRegistrationIdResolver(clientRegistrationIdResolver); OAuth2AuthorizationFailureHandler authorizationFailureHandler = OAuth2ClientHttpRequestInterceptor .authorizationFailureHandler(authorizedClientRepository);