fix:fix contract reporting bug when using TSF. (#1422)

Co-authored-by: Haotian Zhang <skyebefreeman@qq.com>
pull/1424/head
Fishtail 3 months ago committed by GitHub
parent 95006a41fb
commit cc927d611a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -30,3 +30,4 @@
- [feat: support otel trace](https://github.com/Tencent/spring-cloud-tencent/pull/1419)
- [feat:support TSF router.](https://github.com/Tencent/spring-cloud-tencent/pull/1420)
- [feat:upgrade nearby router and add namespace nearby router.](https://github.com/Tencent/spring-cloud-tencent/pull/1421)
- [fix:fix contract reporting bug when using TSF.](https://github.com/Tencent/spring-cloud-tencent/pull/1422)

@ -161,17 +161,11 @@ public class PolarisContractProperties implements ContractProperties {
@Override
public boolean isReportEnabled() {
if (Objects.nonNull(extendContractProperties)) {
return extendContractProperties.isReportEnabled();
}
return reportEnabled;
}
@Override
public void setReportEnabled(boolean reportEnabled) {
if (Objects.nonNull(extendContractProperties)) {
extendContractProperties.setReportEnabled(reportEnabled);
}
this.reportEnabled = reportEnabled;
}

@ -56,7 +56,7 @@ public class TsfContractProperties implements ExtendedContractProperties {
@Override
public boolean isEnabled() {
return false;
return enabled;
}
@Override

@ -105,6 +105,7 @@ public final class TsfCoreEnvironmentPostProcessor implements EnvironmentPostPro
defaultProperties.put("spring.cloud.polaris.config.enabled", "true");
}
else {
defaultProperties.put("spring.cloud.polaris.contract.report.enabled", "false");
defaultProperties.put("spring.cloud.polaris.config.enabled", "true");
defaultProperties.put("spring.cloud.polaris.config.internal-enabled", "false");
defaultProperties.put("spring.cloud.polaris.config.data-source", "consul");

Loading…
Cancel
Save