fix:fix transfer http headers not working bug. (#665)

pull/666/head 1.8.1-2020.0.5
Haotian Zhang 2 years ago committed by GitHub
parent 90c60f9925
commit 9d5cf90d35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,34 +0,0 @@
name: Codecov
on:
push:
branches:
- hoxton
- 2021.0
- 2020.0
- greenwich
pull_request:
branches:
- hoxton
- 2021.0
- 2020.0
- greenwich
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout codes
uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Test with Maven
run: mvn -B test --file pom.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ${{ github.workspace }}/target/site/jacoco/jacoco.xml

@ -1,2 +1,4 @@
# Change Log # Change Log
--- ---
- [fix:fix transfer http headers not working bug.](https://github.com/Tencent/spring-cloud-tencent/pull/665)

@ -17,9 +17,11 @@
Spring Cloud Tencent 是腾讯开源的一站式微服务解决方案。 Spring Cloud Tencent 是腾讯开源的一站式微服务解决方案。
Spring Cloud Tencent 实现了Spring Cloud 标准微服务 SPI开发者可以基于 Spring Cloud Tencent 快速开发 Spring Cloud 云原生分布式应用。 Spring Cloud Tencent 实现了Spring Cloud 标准微服务 SPI开发者可以基于 Spring Cloud Tencent 快速开发 Spring Cloud
云原生分布式应用。
Spring Cloud Tencent 的核心依托腾讯开源的一站式服务发现与治理平台 [Polaris](https://github.com/polarismesh/polaris),实现各种分布式微服务场景。 Spring Cloud Tencent 的核心依托腾讯开源的一站式服务发现与治理平台 [Polaris](https://github.com/polarismesh/polaris)
,实现各种分布式微服务场景。
- [Polaris Github home page](https://github.com/polarismesh/polaris) - [Polaris Github home page](https://github.com/polarismesh/polaris)
- [Polaris official website](https://polarismesh.cn/) - [Polaris official website](https://polarismesh.cn/)
@ -45,7 +47,8 @@ Spring Cloud Tencent提供的能力包括但不限于
- 控制面地址: `grpc://183.47.111.80:8091` - 控制面地址: `grpc://183.47.111.80:8091`
- -
`spring-cloud-tencent-example` 下 example 地址都默认指向了体验服务地址(`grpc://183.47.111.80:8091`),如果您只是体验 Spring Cloud `spring-cloud-tencent-example` 下 example 地址都默认指向了体验服务地址(`grpc://183.47.111.80:8091`),如果您只是体验
Spring Cloud
Tencent可直接一键运行任何 example。 Tencent可直接一键运行任何 example。
## 管控台 ## 管控台
@ -58,7 +61,9 @@ Spring Cloud Tencent 所有组件都已上传到 Maven 中央仓库,只需要
> 注意: > 注意:
> >
> Spring Cloud Tencent 的版本列表可以查看 [Spring Cloud Tencent 版本管理](https://github.com/Tencent/spring-cloud-tencent/wiki/Spring-Cloud-Tencent-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86) 。 > Spring Cloud Tencent
> 的版本列表可以查看 [Spring Cloud Tencent 版本管理](https://github.com/Tencent/spring-cloud-tencent/wiki/Spring-Cloud-Tencent-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86)
> 。
例如: 例如:
@ -70,7 +75,7 @@ Spring Cloud Tencent 所有组件都已上传到 Maven 中央仓库,只需要
<groupId>com.tencent.cloud</groupId> <groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId> <artifactId>spring-cloud-tencent-dependencies</artifactId>
<!--version number--> <!--version number-->
<version>1.8.0-2020.0.5</version> <version>1.8.1-2020.0.5</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>

@ -60,7 +60,9 @@ dependencies.
> Notice: > Notice:
> >
> The version list of Spring Cloud Tencent can be found in [Spring Cloud Tencent Version Management](https://github.com/Tencent/spring-cloud-tencent/wiki/Spring-Cloud-Tencent-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86). > The version list of Spring Cloud Tencent can be found
> in [Spring Cloud Tencent Version Management](https://github.com/Tencent/spring-cloud-tencent/wiki/Spring-Cloud-Tencent-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86)
> .
For example: For example:
@ -72,7 +74,7 @@ For example:
<groupId>com.tencent.cloud</groupId> <groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId> <artifactId>spring-cloud-tencent-dependencies</artifactId>
<!--version number--> <!--version number-->
<version>1.8.0-2020.0.5</version> <version>1.8.1-2020.0.5</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>

@ -89,7 +89,7 @@
<properties> <properties>
<!-- Project revision --> <!-- Project revision -->
<revision>1.8.0-2020.0.5</revision> <revision>1.8.1-2020.0.5</revision>
<!-- Spring Cloud --> <!-- Spring Cloud -->
<spring.cloud.version>2020.0.5</spring.cloud.version> <spring.cloud.version>2020.0.5</spring.cloud.version>

@ -60,7 +60,7 @@ public class EncodeTransferMedataFeignInterceptor implements RequestInterceptor,
MetadataContext metadataContext = MetadataContextHolder.get(); MetadataContext metadataContext = MetadataContextHolder.get();
Map<String, String> customMetadata = metadataContext.getCustomMetadata(); Map<String, String> customMetadata = metadataContext.getCustomMetadata();
Map<String, String> disposableMetadata = metadataContext.getDisposableMetadata(); Map<String, String> disposableMetadata = metadataContext.getDisposableMetadata();
Map<String, String> transHeaders = metadataContext.getTransHeaders(); Map<String, String> transHeaders = metadataContext.getTransHeadersKV();
this.buildMetadataHeader(requestTemplate, disposableMetadata, CUSTOM_DISPOSABLE_METADATA); this.buildMetadataHeader(requestTemplate, disposableMetadata, CUSTOM_DISPOSABLE_METADATA);

@ -60,7 +60,7 @@ public class EncodeTransferMedataRestTemplateInterceptor implements ClientHttpRe
MetadataContext metadataContext = MetadataContextHolder.get(); MetadataContext metadataContext = MetadataContextHolder.get();
Map<String, String> customMetadata = metadataContext.getCustomMetadata(); Map<String, String> customMetadata = metadataContext.getCustomMetadata();
Map<String, String> disposableMetadata = metadataContext.getDisposableMetadata(); Map<String, String> disposableMetadata = metadataContext.getDisposableMetadata();
Map<String, String> transHeaders = metadataContext.getTransHeaders(); Map<String, String> transHeaders = metadataContext.getTransHeadersKV();
// build custom disposable metadata request header // build custom disposable metadata request header
this.buildMetadataHeader(httpRequest, disposableMetadata, CUSTOM_DISPOSABLE_METADATA); this.buildMetadataHeader(httpRequest, disposableMetadata, CUSTOM_DISPOSABLE_METADATA);

@ -70,7 +70,7 @@
</developers> </developers>
<properties> <properties>
<revision>1.8.0-2020.0.5</revision> <revision>1.8.1-2020.0.5</revision>
<!-- Dependencies --> <!-- Dependencies -->
<polaris.version>1.9.1</polaris.version> <polaris.version>1.9.1</polaris.version>

@ -34,6 +34,11 @@
<artifactId>spring-cloud-tencent-gateway-plugin</artifactId> <artifactId>spring-cloud-tencent-gateway-plugin</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-metadata-transfer</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.tencent.cloud</groupId> <groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-featureenv-plugin</artifactId> <artifactId>spring-cloud-tencent-featureenv-plugin</artifactId>

Loading…
Cancel
Save