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

pull/1395/head
Haotian Zhang 5 months ago committed by GitHub
parent e3333c8432
commit 905a5f3ba9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -29,3 +29,4 @@
- [feat: support otel trace](https://github.com/Tencent/spring-cloud-tencent/pull/1363)
- [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)

@ -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