fix: fix TSF context bootstrap configuration (#1395)

pull/1429/head
Fishtail 3 months ago committed by GitHub
parent ab8df5b640
commit ef4829597a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -30,3 +30,4 @@
- [feat:support TSF router.](https://github.com/Tencent/spring-cloud-tencent/pull/1368) - [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) - [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 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)

@ -17,13 +17,11 @@
package com.tencent.cloud.polaris.context.tsf.consul; 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.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@Import({PolarisContextAutoConfiguration.class, TsfConsulAutoConfiguration.class}) @Import({TsfConsulAutoConfiguration.class})
public class TsfConsulBootstrapConfiguration { public class TsfConsulBootstrapConfiguration {
} }

@ -59,7 +59,8 @@ public final class TsfCoreEnvironmentPostProcessor implements EnvironmentPostPro
String tsfAppId = environment.getProperty("tsf_app_id"); String tsfAppId = environment.getProperty("tsf_app_id");
if (StringUtils.isNotBlank(tsfAppId)) { if (StringUtils.isNotBlank(tsfAppId)) {
Map<String, Object> defaultProperties = new HashMap<>(); Map<String, Object> defaultProperties = new HashMap<>();
// enable polaris as default
defaultProperties.put("spring.cloud.polaris.enabled", "true");
// tsf_application_id // tsf_application_id
String tsfApplicationId = environment.getProperty("tsf_application_id"); String tsfApplicationId = environment.getProperty("tsf_application_id");
if (StringUtils.isBlank(tsfApplicationId)) { if (StringUtils.isBlank(tsfApplicationId)) {

Loading…
Cancel
Save