我尝试从 Spring Boot 1.5.10 迁移到 2.0.0.RELEASE 时遇到问题。
我已经实现了 AuthoritiesExtractor 接口(interface),它在版本 1.5.10 中工作,但在版本 2.0.0 中我收到此错误
在路径 org.springframework.boot.autoconfigure.security.oauth2.resource 中找不到类 AuthoritiesExtractor
确实找不到。
最佳答案
AuthoritiesExtractor 接口(interface)已从 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.RELEASE - 2.1.3.RELEASE) 通过以下方式导入:
import org.springframework.boot.autoconfigure.security.oauth2.resource.AuthoritiesExtractor;
关于java - Spring Boot 2 权限提取器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49250548/