Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘OAuth2SsoClientCustomConfiguration’: Unsatisfied dependency expressed through field ‘jwtTokenEnhancer’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘jwtTokenEnhancer’ defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfiguration$JwtTokenServicesConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method ‘jwtTokenEnhancer’ threw exception; nested exception is org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [interface java.util.Map] and content type [text/html;charset=UTF-8]
2021-04-21 11:49:43.238 INFO 46092 — [ main] ConditionEvaluationReportLoggingListener :
原因:clientId 和 clientSecret没有设置正确 ,设置成在oauth2系统配置的子系统clientId 和 clientSecret 即可