diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b597ab58..f75209710 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,3 +30,4 @@ - [feat:support TSF router.](https://github.com/Tencent/spring-cloud-tencent/pull/1368) - [feat:upgrade nearby router and add namespace nearby router.](https://github.com/Tencent/spring-cloud-tencent/pull/1371) - [fix:fix contract reporting bug when using TSF.](https://github.com/Tencent/spring-cloud-tencent/pull/1373) +- [fix: fix TSF context bootstrap configuration](https://github.com/Tencent/spring-cloud-tencent/pull/1395) \ No newline at end of file diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulBootstrapConfiguration.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulBootstrapConfiguration.java index 277b80f3a..594697a0c 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulBootstrapConfiguration.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulBootstrapConfiguration.java @@ -17,13 +17,11 @@ package com.tencent.cloud.polaris.context.tsf.consul; -import com.tencent.cloud.polaris.context.config.PolarisContextAutoConfiguration; - import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @Configuration(proxyBeanMethods = false) -@Import({PolarisContextAutoConfiguration.class, TsfConsulAutoConfiguration.class}) +@Import({TsfConsulAutoConfiguration.class}) public class TsfConsulBootstrapConfiguration { } diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java index 135f5d9f7..6cfda6adf 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java @@ -59,7 +59,8 @@ public final class TsfCoreEnvironmentPostProcessor implements EnvironmentPostPro String tsfAppId = environment.getProperty("tsf_app_id"); if (StringUtils.isNotBlank(tsfAppId)) { Map defaultProperties = new HashMap<>(); - + // enable polaris as default + defaultProperties.put("spring.cloud.polaris.enabled", "true"); // tsf_application_id String tsfApplicationId = environment.getProperty("tsf_application_id"); if (StringUtils.isBlank(tsfApplicationId)) {