java - Spring Boot 2 权限提取器

标签 java spring oauth-2.0

我尝试从 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/

相关文章:

java - 使用 spring mvc 设置日志记录,只想将跟踪/调试限制到我的代码

java - Spring MVC, hibernate : Found shared references to collection when retreiving data

r - 如何使用带有 facebook API 的 httr 包中的 oauth2.0_token 函数?

php - token 中的段数错误 (OAuth Google Api)

java - 如何在 Debug模式下启动 Apache Zeppelin?

java - 如何在Struts2中使用JSF数据表?

spring - 如何在 Spring 中绑定(bind)属性的字符串数组?

android - ionic 自定义 oauth2 重定向 URL Angular

java - 字符串的计数频率

java - 在 Java 中动态更改 BorderLayout