spring-attic / spring-cloud-security

Security concerns for distributed applications implemented in Spring
Apache License 2.0
531 stars 245 forks source link

TokenRelayAutoConfiguration can't find ServerOAuth2AuthorizedClientRepository #234

Closed ChenZheOnePiece closed 4 years ago

ChenZheOnePiece commented 4 years ago

spring cloud version SR5 I typed a jar package. It can run in windows ,But it can't run in Linux .The error is as follows

Description:

Parameter 0 of method tokenRelayGatewayFilterFactory in org.springframework.cloud.security.oauth2.gateway.TokenRelayAutoConfiguration required a bean of type 'org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizedClientRepository' that could not be found.

The following candidates were found but could not be injected:
    - Bean method 'authorizedClientRepository' in 'ReactiveOAuth2ClientConfigurations.ReactiveOAuth2ClientConfiguration' not loaded because @ConditionalOnBean (types: org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository; SearchStrategy: all) did not find any beans of type org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository

Action:

Consider revisiting the entries above or defining a bean of type 'org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizedClientRepository' in your configuration.
spencergibb commented 4 years ago

Closing in favor of gateway issue. Please don't post multiple issues