sample-gateway-oauth2login icon indicating copy to clipboard operation
sample-gateway-oauth2login copied to clipboard

Error when updating to Spring Boot 2.2.0

Open dkokic opened this issue 5 years ago • 5 comments

The following is the runtime error: Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tokenRelayGatewayFilterFactory' defined in class path resource [org/springframework/cloud/security/oauth2/gateway/TokenRelayAutoConfiguration.class]: Unsatisfied dependency expressed through method 'tokenRelayGatewayFilterFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authorizedClientRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveOAuth2ClientConfiguration.class]: Unsatisfied dependency expressed through method 'authorizedClientRepository' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authorizedClientService' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveOAuth2ClientConfiguration.class]: Unsatisfied dependency expressed through method 'authorizedClientService' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: redirectUriTemplate cannot be empty

dkokic avatar Nov 02 '19 15:11 dkokic

I had similar issue. Fixed by proper renaming of property . https://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#oauth2login-boot-property-mappings

devenagravat avatar Dec 05 '19 23:12 devenagravat

@devenagravat thanks for the response, but which property did you rename as there are many in the same link.

jain6968 avatar Sep 13 '21 09:09 jain6968

@devenagravat thanks for the response, but which property did you rename as there are many in the same link.

Did you manage to find a solution to this problem?

rbrtpks avatar Jan 31 '22 15:01 rbrtpks

@jain6968 up?

rbrtpks avatar Feb 02 '22 15:02 rbrtpks