首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OAuth2LoginAuthenticationFilter弹簧安全

OAuth2LoginAuthenticationFilter弹簧安全
EN

Stack Overflow用户
提问于 2018-03-08 17:29:53
回答 1查看 6.3K关注 0票数 4

目前,我正在查看Spring 2、OAuth2和单点登录。我正在运行一个示例项目,但是我得到了:

org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter :ClassNotFoundException

我无法找到将给我这个班级的Maven依赖项。

我试过所有的弹簧-安全核心,启动等组合。

以下是我的朋友:

代码语言:javascript
复制
 <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.0.RC1</version>
</parent>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-core -->
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>5.0.3.RELEASE</version>
    </dependency>

    <!--<dependency>-->
        <!--<groupId>org.springframework.security.oauth</groupId>-->
        <!--<artifactId>spring-security-oauth2</artifactId>-->
    <!--</dependency>-->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.thymeleaf.extras</groupId>
        <artifactId>thymeleaf-extras-springsecurity4</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.security.oauth.boot</groupId>
        <artifactId>spring-security-oauth2-autoconfigure</artifactId>
        <version>2.0.0.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework.security.oauth/spring-security-oauth2 -->
    <dependency>
        <groupId>org.springframework.security.oauth</groupId>
        <artifactId>spring-security-oauth2</artifactId>
        <version>2.2.1.RELEASE</version>
    </dependency>

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

</dependencies> 

在确定正确的依赖关系时,任何帮助都将是非常感谢的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-03-28 05:20:12

我为这个问题向Spring提交了一个错误报告。虽然这是一个持续的对话,但我确实解决了缺失的依赖。只需包括:

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

https://stackoverflow.com/questions/49179087

复制
相关文章

相似问题

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