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

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

@ -26,3 +26,4 @@
- [feat: support otel trace](https://github.com/Tencent/spring-cloud-tencent/pull/1402) - [feat: support otel trace](https://github.com/Tencent/spring-cloud-tencent/pull/1402)
- [feat:support TSF router.](https://github.com/Tencent/spring-cloud-tencent/pull/1403) - [feat:support TSF router.](https://github.com/Tencent/spring-cloud-tencent/pull/1403)
- [feat:upgrade nearby router and add namespace nearby router.](https://github.com/Tencent/spring-cloud-tencent/pull/1404) - [feat:upgrade nearby router and add namespace nearby router.](https://github.com/Tencent/spring-cloud-tencent/pull/1404)
- [fix:fix contract reporting bug when using TSF.](https://github.com/Tencent/spring-cloud-tencent/pull/1406)

@ -1,7 +1,9 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.tencent.cloud.polaris.config.tsf.PolarisAdaptorTsfConfigAutoConfiguration,\ com.tencent.cloud.polaris.config.tsf.PolarisAdaptorTsfConfigAutoConfiguration,\
com.tencent.cloud.polaris.config.PolarisConfigAutoConfiguration,\ com.tencent.cloud.polaris.config.PolarisConfigAutoConfiguration,\
com.tencent.cloud.polaris.config.endpoint.PolarisConfigEndpointAutoConfiguration com.tencent.cloud.polaris.config.PolarisConfigBootstrapAutoConfiguration,\
com.tencent.cloud.polaris.config.endpoint.PolarisConfigEndpointAutoConfiguration,\
com.tencent.cloud.polaris.config.tsf.PolarisAdaptorTsfConfigBootstrapConfiguration
org.springframework.cloud.bootstrap.BootstrapConfiguration=\ org.springframework.cloud.bootstrap.BootstrapConfiguration=\
com.tencent.cloud.polaris.config.PolarisConfigBootstrapAutoConfiguration,\ com.tencent.cloud.polaris.config.PolarisConfigBootstrapAutoConfiguration,\
com.tencent.cloud.polaris.config.tsf.PolarisAdaptorTsfConfigBootstrapConfiguration com.tencent.cloud.polaris.config.tsf.PolarisAdaptorTsfConfigBootstrapConfiguration

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

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

Loading…
Cancel
Save