diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5d71505..35bbb6c1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,4 +22,5 @@ - [feat:add trace report support.](https://github.com/Tencent/spring-cloud-tencent/pull/1322) - [fix: fix lossless test case unstable issues.](https://github.com/Tencent/spring-cloud-tencent/pull/1324) - [feat:support consul service update task.](https://github.com/Tencent/spring-cloud-tencent/pull/1329) -- [fix:fix app starting failed when user using custom OpenAPI bean.](https://github.com/Tencent/spring-cloud-tencent/pull/1330) \ No newline at end of file +- [fix:fix app starting failed when user using custom OpenAPI bean.](https://github.com/Tencent/spring-cloud-tencent/pull/1330) +- [fix: move ConditionalOnTsfEnabled to spring-cloud-tencent-commons and fix PolarisInetUtilsAutoConfiguration.](https://github.com/Tencent/spring-cloud-tencent/pull/1330) \ No newline at end of file diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/tsf/PolarisAdaptorTsfConfigAutoConfiguration.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/tsf/PolarisAdaptorTsfConfigAutoConfiguration.java index 9c05d2eb0..11f75ff44 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/tsf/PolarisAdaptorTsfConfigAutoConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/tsf/PolarisAdaptorTsfConfigAutoConfiguration.java @@ -17,10 +17,10 @@ package com.tencent.cloud.polaris.config.tsf; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.config.ConditionalOnPolarisConfigEnabled; import com.tencent.cloud.polaris.config.config.PolarisConfigProperties; import com.tencent.cloud.polaris.config.tsf.controller.PolarisAdaptorTsfConfigController; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.context.tsf.config.TsfCoreProperties; import com.tencent.cloud.polaris.context.tsf.consul.TsfConsulProperties; import com.tencent.tsf.consul.config.watch.TsfConsulConfigRefreshEventListener; diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/tsf/PolarisAdaptorTsfConfigBootstrapConfiguration.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/tsf/PolarisAdaptorTsfConfigBootstrapConfiguration.java index 1ee9176c6..3c927ee63 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/tsf/PolarisAdaptorTsfConfigBootstrapConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/tsf/PolarisAdaptorTsfConfigBootstrapConfiguration.java @@ -17,8 +17,8 @@ package com.tencent.cloud.polaris.config.tsf; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.config.ConditionalOnPolarisConfigEnabled; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Configuration; diff --git a/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfContractPropertiesAutoConfiguration.java b/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfContractPropertiesAutoConfiguration.java index 4d0d26cab..79b75875a 100644 --- a/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfContractPropertiesAutoConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfContractPropertiesAutoConfiguration.java @@ -17,7 +17,7 @@ package com.tencent.cloud.polaris.contract.tsf; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; diff --git a/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfContractPropertiesBootstrapConfiguration.java b/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfContractPropertiesBootstrapConfiguration.java index 3969f2237..56cf5b3be 100644 --- a/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfContractPropertiesBootstrapConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfContractPropertiesBootstrapConfiguration.java @@ -17,7 +17,7 @@ package com.tencent.cloud.polaris.contract.tsf; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfSwaggerAutoConfiguration.java b/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfSwaggerAutoConfiguration.java index c50f6b67b..e066a97c7 100644 --- a/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfSwaggerAutoConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/tsf/TsfSwaggerAutoConfiguration.java @@ -16,7 +16,7 @@ */ package com.tencent.cloud.polaris.contract.tsf; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.contract.config.PolarisContractProperties; import io.swagger.v3.oas.models.OpenAPI; import org.springdoc.core.providers.ObjectMapperProvider; diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/TsfDiscoveryPropertiesAutoConfiguration.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/TsfDiscoveryPropertiesAutoConfiguration.java index 3502a9be5..e961b2e28 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/TsfDiscoveryPropertiesAutoConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/TsfDiscoveryPropertiesAutoConfiguration.java @@ -17,11 +17,11 @@ package com.tencent.cloud.polaris.tsf; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.common.util.inet.PolarisInetUtils; import com.tencent.cloud.plugin.lossless.config.LosslessProperties; import com.tencent.cloud.polaris.PolarisDiscoveryProperties; import com.tencent.cloud.polaris.context.config.PolarisContextProperties; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.context.tsf.config.TsfCoreProperties; import com.tencent.cloud.polaris.context.tsf.consul.TsfConsulProperties; import com.tencent.cloud.polaris.tsf.lossless.TsfLosslessConfigModifier; diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/TsfDiscoveryPropertiesBootstrapConfiguration.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/TsfDiscoveryPropertiesBootstrapConfiguration.java index 113980971..4395650d2 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/TsfDiscoveryPropertiesBootstrapConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/TsfDiscoveryPropertiesBootstrapConfiguration.java @@ -17,8 +17,8 @@ package com.tencent.cloud.polaris.tsf; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.DiscoveryPropertiesAutoConfiguration; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; import org.springframework.cloud.commons.util.UtilAutoConfiguration; import org.springframework.context.annotation.Configuration; diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/registry/TsfDiscoveryRegistryAutoConfiguration.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/registry/TsfDiscoveryRegistryAutoConfiguration.java index 8e0c66da0..075943e02 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/registry/TsfDiscoveryRegistryAutoConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/tsf/registry/TsfDiscoveryRegistryAutoConfiguration.java @@ -17,8 +17,8 @@ package com.tencent.cloud.polaris.tsf.registry; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.context.PolarisSDKContextManager; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.context.tsf.config.TsfCoreProperties; import com.tencent.cloud.polaris.registry.PolarisServiceRegistryAutoConfiguration; import com.tencent.cloud.polaris.tsf.TsfDiscoveryProperties; diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/ConditionalOnTsfEnabled.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/tsf/ConditionalOnTsfEnabled.java similarity index 97% rename from spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/ConditionalOnTsfEnabled.java rename to spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/tsf/ConditionalOnTsfEnabled.java index 1851f4bdc..dee92deb0 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/ConditionalOnTsfEnabled.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/tsf/ConditionalOnTsfEnabled.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.polaris.context.tsf; +package com.tencent.cloud.common.tsf; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/inet/PolarisInetUtilsAutoConfiguration.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/inet/PolarisInetUtilsAutoConfiguration.java index 39d485815..b3b4655dc 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/inet/PolarisInetUtilsAutoConfiguration.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/inet/PolarisInetUtilsAutoConfiguration.java @@ -17,6 +17,8 @@ package com.tencent.cloud.common.util.inet; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; + import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.cloud.commons.util.InetUtilsProperties; import org.springframework.context.annotation.Bean; @@ -29,6 +31,7 @@ * @author Haotian Zhang */ @Configuration(proxyBeanMethods = false) +@ConditionalOnTsfEnabled public class PolarisInetUtilsAutoConfiguration { @Bean diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-trace-plugin/src/main/java/com/tencent/cloud/plugin/trace/tsf/TsfTracePropertiesAutoConfiguration.java b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-trace-plugin/src/main/java/com/tencent/cloud/plugin/trace/tsf/TsfTracePropertiesAutoConfiguration.java index c88e0c5fd..3b5b102f4 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-trace-plugin/src/main/java/com/tencent/cloud/plugin/trace/tsf/TsfTracePropertiesAutoConfiguration.java +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-trace-plugin/src/main/java/com/tencent/cloud/plugin/trace/tsf/TsfTracePropertiesAutoConfiguration.java @@ -18,7 +18,7 @@ package com.tencent.cloud.plugin.trace.tsf; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/config/TsfCorePropertiesAutoConfiguration.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/config/TsfCorePropertiesAutoConfiguration.java index 5afd06d0e..97f56bf0b 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/config/TsfCorePropertiesAutoConfiguration.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/config/TsfCorePropertiesAutoConfiguration.java @@ -17,8 +17,8 @@ package com.tencent.cloud.polaris.context.tsf.config; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import com.tencent.cloud.polaris.context.config.PolarisContextAutoConfiguration; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulAutoConfiguration.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulAutoConfiguration.java index a7eea534b..612b9934e 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulAutoConfiguration.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/consul/TsfConsulAutoConfiguration.java @@ -17,7 +17,7 @@ package com.tencent.cloud.polaris.context.tsf.consul; -import com.tencent.cloud.polaris.context.tsf.ConditionalOnTsfEnabled; +import com.tencent.cloud.common.tsf.ConditionalOnTsfEnabled; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties;