添加 OKTA 配置后启动 JHipster Gateway 应用程序时出现以下错误:
$ cd saathratrigateway
$ ./mvnw
...
2020-11-13 22:31:16.278 WARN 80043 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authorizationHeaderUtil' defined in file [/Users/amar/workspace/saathratri-app-holder/saathratrigateway/target/classes/com/saathratri/security/oauth2/AuthorizationHeaderUtil.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.security.oauth2.client.OAuth2AuthorizedClientService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2020-11-13 22:31:16.280 DEBUG 80043 --- [ restartedMain] c.e.c.E.saathratri.domain.Authority : Close successful.
2020-11-13 22:31:16.281 DEBUG 80043 --- [ restartedMain] c.e.c.E.saathratri.domain.User : Close successful.
2020-11-13 22:31:16.281 DEBUG 80043 --- [ restartedMain] c.e.c.E.s.domain.User.authorities : Close successful.
2020-11-13 22:31:16.282 DEBUG 80043 --- [ restartedMain] c.ehcache.core.Ehcache-usersByEmail : Close successful.
2020-11-13 22:31:16.282 DEBUG 80043 --- [ restartedMain] c.ehcache.core.Ehcache-usersByLogin : Close successful.
2020-11-13 22:31:16.479 ERROR 80043 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.saathratri.security.oauth2.AuthorizationHeaderUtil required a bean of type 'org.springframework.security.oauth2.client.OAuth2AuthorizedClientService' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'authorizedClientService' in 'OAuth2WebSecurityConfiguration' not loaded because @ConditionalOnBean (types: org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; SearchStrategy: all) did not find any beans of type org.springframework.security.oauth2.client.registration.ClientRegistrationRepository
Action:
Consider revisiting the entries above or defining a bean of type 'org.springframework.security.oauth2.client.OAuth2AuthorizedClientService' in your configuration.
任何建议将不胜感激。