首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring Boot 2和ResourceServerProperties

Spring Boot 2和ResourceServerProperties
EN

Stack Overflow用户
提问于 2017-10-28 18:46:40
回答 2查看 4K关注 0票数 3

我们有Spring Boot Application(1.5.8版)。我们试着检查它是否与即将发布的Spring Boot2版本(目前是M5)兼容。

spring-boot-autoconfigure依赖中缺少两个类(UserInfoTokenServices和ResourceServerProperties)。

有没有什么替代方案?

谢谢

EN

回答 2

Stack Overflow用户

发布于 2018-03-16 21:31:55

试试这个。在迁移到SpringBoot 2之后,它对我的Oauth2很有帮助。

代码语言:javascript
复制
<dependency>
    <groupId>org.springframework.security.oauth.boot</groupId>
    <artifactId>spring-security-oauth2-autoconfigure</artifactId>
   <version>2.0.0.RELEASE</version>
</dependency>
票数 6
EN

Stack Overflow用户

发布于 2017-10-28 18:59:52

引用Spring Boot 2.0.0.M5发行说明

Spring Security OAuth项目中的

功能正在迁移到核心Spring Security。OAuth 2.0客户端支持已经添加,其他功能将在适当的时候迁移。

如果您依赖于尚未迁移的Spring Security OAuth特性,则需要添加org.springframework.security.oauth:spring-security-oauth2并手动进行配置。如果你只需要Spring2.0客户端支持,你可以使用OAuth Boot2.0提供的自动配置。我们还在继续支持Spring Boot 1.5,这样旧的应用程序就可以继续使用它,直到提供升级路径。

我认为你必须定义oauth2 dep,就像

代码语言:javascript
复制
<dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-oauth2-client</artifactId>
</dependency>
<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-oauth2</artifactId>
</dependency>
<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-security</artifactId>
</dependency>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46988854

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档