Spring Security——org.springframework.security.oauth:spring-security-oauth2项目已过时解决方案

问题描述

Maven 

        <!--Spring Security-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <!--Spring Security OAuth2-->
        <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth2</artifactId>
            <version>2.4.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security.oauth.boot</groupId>
            <artifactId>spring-security-oauth2-autoconfigure</artifactId>
            <version>2.2.2.RELEASE</version>
        </dependency>

官方文档

https://docs.spring.io/spring-security/site/docs/5.2.3.RELEASE/reference/html5/

问题分析

GitHub:https://github.com/spring-projects/spring-security-oauth

此项目已经停止维护。

 

OAuth 2.0 Migration Guide

https://github.com/spring-projects/spring-security/wiki/OAuth-2.0-Migration-Guide 

 GitHub中几乎所有类都被打上已过时注解。

解决方案

GitHub 

https://github.com/spring-projects/spring-security/tree/master/oauth2 

Maven

        <!--Spring Security-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <!--Spring Security OAuth2-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-client</artifactId>
        </dependency>

官方文档

https://docs.spring.io/spring-security/site/docs/5.2.3.RELEASE/reference/html5/#oauth2

参考文章

 

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 1024 设计师:上身试试 返回首页