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

pull/667/head 1.8.1-2021.0.3
Haotian Zhang 2 years ago committed by GitHub
parent 9911662456
commit c72288cb88
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
---
-
- [fix:fix transfer http headers not working bug.](https://github.com/Tencent/spring-cloud-tencent/pull/664)

@ -62,7 +62,8 @@ 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 版本管理](https://github.com/Tencent/spring-cloud-tencent/wiki/Spring-Cloud-Tencent-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86)
> 。
例如:
@ -75,7 +76,7 @@ Spring Cloud Tencent 所有组件都已上传到 Maven 中央仓库,只需要
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId>
<!--version number-->
<version>1.8.0-2021.0.3</version>
<version>1.8.1-2021.0.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>

@ -61,7 +61,8 @@ dependencies.
> 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)
>
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:
@ -74,7 +75,7 @@ For example:
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId>
<!--version number-->
<version>1.8.0-2021.0.3</version>
<version>1.8.1-2021.0.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>

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

@ -60,7 +60,7 @@ public class EncodeTransferMedataFeignInterceptor implements RequestInterceptor,
MetadataContext metadataContext = MetadataContextHolder.get();
Map<String, String> customMetadata = metadataContext.getCustomMetadata();
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);

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

@ -70,7 +70,7 @@
</developers>
<properties>
<revision>1.9.0-2021.0.3-SNAPSHOT</revision>
<revision>1.8.1-2021.0.3</revision>
<!-- Dependencies -->
<polaris.version>1.9.1</polaris.version>

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

Loading…
Cancel
Save