From 758e1271d8f06a1e28fc01e26388bb4d2d8ae8fc Mon Sep 17 00:00:00 2001 From: lishangbu Date: Fri, 25 Dec 2020 15:34:00 +0800 Subject: [PATCH] =?UTF-8?q?:heavy=5Fminus=5Fsign:=20Removing=20a=20depende?= =?UTF-8?q?ncy.=E7=A7=BB=E9=99=A4=E8=80=81=E7=89=88spring=20security?= =?UTF-8?q?=E5=86=85=E5=AE=B9=EF=BC=8C=E6=96=B0=E7=89=88Spring=20Security?= =?UTF-8?q?=20=E5=8C=85=E7=A7=BB=E5=8A=A8=E8=87=B3spring-cloud-commons?= =?UTF-8?q?=E4=B8=8B,=E8=A7=81=E5=AE=98=E6=96=B9PR:https://github.com/spri?= =?UTF-8?q?ng-cloud/spring-cloud-commons/pull/870/files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pig-common/pig-common-security/pom.xml | 4 ---- .../PigResourceServerTokenRelayAutoConfiguration.java | 2 +- .../common/security/feign/PigFeignClientConfiguration.java | 2 +- .../pig/common/security/feign/PigFeignClientInterceptor.java | 4 ++-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pig-common/pig-common-security/pom.xml b/pig-common/pig-common-security/pom.xml index 3f8429f8..1f39ae67 100755 --- a/pig-common/pig-common-security/pom.xml +++ b/pig-common/pig-common-security/pom.xml @@ -38,10 +38,6 @@ 3.0.0 - - org.springframework.cloud - spring-cloud-starter-security - org.springframework.security.oauth.boot spring-security-oauth2-autoconfigure diff --git a/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/component/PigResourceServerTokenRelayAutoConfiguration.java b/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/component/PigResourceServerTokenRelayAutoConfiguration.java index 15ded704..27eb7e13 100755 --- a/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/component/PigResourceServerTokenRelayAutoConfiguration.java +++ b/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/component/PigResourceServerTokenRelayAutoConfiguration.java @@ -22,7 +22,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration; -import org.springframework.cloud.security.oauth2.client.AccessTokenContextRelay; +import org.springframework.cloud.commons.security.AccessTokenContextRelay; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; diff --git a/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/feign/PigFeignClientConfiguration.java b/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/feign/PigFeignClientConfiguration.java index 2916a2f3..52ff7769 100755 --- a/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/feign/PigFeignClientConfiguration.java +++ b/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/feign/PigFeignClientConfiguration.java @@ -18,7 +18,7 @@ package com.pig4cloud.pig.common.security.feign; import feign.RequestInterceptor; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.cloud.security.oauth2.client.AccessTokenContextRelay; +import org.springframework.cloud.commons.security.AccessTokenContextRelay; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.oauth2.client.OAuth2ClientContext; diff --git a/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/feign/PigFeignClientInterceptor.java b/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/feign/PigFeignClientInterceptor.java index eea948eb..82eca06b 100755 --- a/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/feign/PigFeignClientInterceptor.java +++ b/pig-common/pig-common-security/src/main/java/com/pig4cloud/pig/common/security/feign/PigFeignClientInterceptor.java @@ -20,8 +20,8 @@ import cn.hutool.core.collection.CollUtil; import com.pig4cloud.pig.common.core.constant.SecurityConstants; import feign.RequestTemplate; import lombok.extern.slf4j.Slf4j; -import org.springframework.cloud.security.oauth2.client.AccessTokenContextRelay; -import org.springframework.cloud.security.oauth2.client.feign.OAuth2FeignRequestInterceptor; +import org.springframework.cloud.commons.security.AccessTokenContextRelay; +import org.springframework.cloud.openfeign.security.OAuth2FeignRequestInterceptor; import org.springframework.security.oauth2.client.OAuth2ClientContext; import org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails;