Skip to content

Commit 5848bfc

Browse files
authored
fix: fix TSF context bootstrap configuration (#1424)
1 parent cc927d6 commit 5848bfc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@
3131
- [feat:support TSF router.](https://github.com/Tencent/spring-cloud-tencent/pull/1420)
3232
- [feat:upgrade nearby router and add namespace nearby router.](https://github.com/Tencent/spring-cloud-tencent/pull/1421)
3333
- [fix:fix contract reporting bug when using TSF.](https://github.com/Tencent/spring-cloud-tencent/pull/1422)
34+
- [fix: fix TSF context bootstrap configuration](https://github.com/Tencent/spring-cloud-tencent/pull/1424)

spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulBootstrapConfiguration.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@
1717

1818
package com.tencent.cloud.polaris.context.tsf.consul;
1919

20-
import com.tencent.cloud.polaris.context.config.PolarisContextAutoConfiguration;
21-
2220
import org.springframework.context.annotation.Configuration;
2321
import org.springframework.context.annotation.Import;
2422

2523
@Configuration(proxyBeanMethods = false)
26-
@Import({PolarisContextAutoConfiguration.class, TsfConsulAutoConfiguration.class})
24+
@Import({TsfConsulAutoConfiguration.class})
2725
public class TsfConsulBootstrapConfiguration {
2826

2927
}

spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringAp
5959
String tsfAppId = environment.getProperty("tsf_app_id");
6060
if (StringUtils.isNotBlank(tsfAppId)) {
6161
Map<String, Object> defaultProperties = new HashMap<>();
62-
62+
// enable polaris as default
63+
defaultProperties.put("spring.cloud.polaris.enabled", "true");
6364
// tsf_application_id
6465
String tsfApplicationId = environment.getProperty("tsf_application_id");
6566
if (StringUtils.isBlank(tsfApplicationId)) {

0 commit comments

Comments
 (0)