弹簧启动 2 权限提取器



当我尝试从 Spring Boot 1.5.10 迁移到 2.0.0.RELEASE 时,我遇到了一个问题。

我已经实现了权限提取器接口,它在 1.5.10 版中工作,但在 2.0.0 版中我收到此错误

class AuthoritiesExtractor not found in path org.springframework.boot.autoconfigure.security.oauth2.resource

真的找不到。

AuthoritiesExtractor 接口已从spring-boot-autoconfigure依赖项移动到以下依赖项:

<dependency>
    <groupId>org.springframework.security.oauth.boot</groupId>
    <artifactId>spring-security-oauth2-autoconfigure</artifactId>
    <version>2.0.1.RELEASE</version>
</dependency>

对于版本>=2.0.0m5 (2.0.1.发布 - 2.1.3.发布(通过以下方式导入:

import org.springframework.boot.autoconfigure.security.oauth2.resource.AuthoritiesExtractor;

已解决

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>

最新更新