Spring Boot 2.1.1.RELEASE版本的spring-boot-starter-parent的* autoconfigure.security.oauth2和* security.oauth2中的类的模拟是什么?
在此版本中将其删除。
import org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties;
import org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoTokenServices;
import org.springframework.security.oauth2.client.OAuth2ClientContext;
import org.springframework.security.oauth2.client.OAuth2RestTemplate;
import org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter;
import org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter;
import org.springframework.security.oauth2.client.token.grant.code.AuthorizationCodeResourceDetails;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableOAuth2Client;
答案 0 :(得分:1)
我认为您缺少的是依赖spring-security-oauth2-autoconfigure
来使您的旧设置在Spring Boot 2.1.1.RELEASE中“无缝”运行
<dependency>
<groupId>org.springframework.security.oauth.boot</groupId>
<artifactId>spring-security-oauth2-autoconfigure</artifactId>
<version>2.1.1.RELEASE</version>
</dependency>
话说回来,项目是维护模式,推荐的方法是使用built in Spring Oauth support。