真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

springboot2集成oauth2的示例分析

今天就跟大家聊聊有關springboot2集成oauth2的示例分析,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結了以下內容,希望大家根據(jù)這篇文章可以有所收獲。

站在用戶的角度思考問題,與客戶深入溝通,找到阜寧網(wǎng)站設計與阜寧網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗,讓設計與互聯(lián)網(wǎng)技術結合,創(chuàng)造個性化、用戶體驗好的作品,建站類型包括:網(wǎng)站設計制作、網(wǎng)站設計、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣、域名與空間、網(wǎng)站空間、企業(yè)郵箱。業(yè)務覆蓋阜寧地區(qū)。

@EnableOAuth3Client注解,并自定義了相關配置

 @Bean
    public FilterRegistrationBean oauth3ClientFilterRegistration(OAuth3ClientContextFilter filter) {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(filter);
        registration.setOrder(-100);
        return registration;
    }

    @Bean
    @ConfigurationProperties("security.oauth3")
    public ClientResources trina() {
        return new ClientResources();
    }

啟動后會報下面錯誤:

Description:

The bean 'scopedTarget.oauth3ClientContext', defined in class path resource [org/springframework/boot/autoconfigure/security/oauth3/client/OAuth3RestOperationsConfiguration$SessionScopedConfiguration$ClientContextConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/security/oauth3/config/annotation/web/configuration/OAuth3ClientConfiguration$OAuth3ClientContextConfiguration.class] and overriding is disabled.

Action:

這個有兩種方案: 1、去掉autoconfig依賴spring-security-oauth3-autoconfigure 2、使用@EnableAutoConfiguration來排除掉oauth3相關自動裝配,這個得根據(jù)具體報錯信息來。 如下:

@EnableAutoConfiguration(exclude = {
        org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})

3、增加配置spring.main.allow-bean-definition-overriding =true

看完上述內容,你們對springboot2集成oauth2的示例分析有進一步的了解嗎?如果還想了解更多知識或者相關內容,請關注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝大家的支持。


本文題目:springboot2集成oauth2的示例分析
文章源于:http://weahome.cn/article/peesho.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部