From f3d3d2a1c6582c00c88e57a0a7412f4fb45d6cd7 Mon Sep 17 00:00:00 2001 From: Haotian Zhang Date: Tue, 25 Feb 2025 17:07:21 +0800 Subject: [PATCH 1/7] feat:use polaris-all for shading third-party dependencies. --- CHANGELOG.md | 1 + pom.xml | 54 ++++- spring-cloud-starter-tencent-all/pom.xml | 77 ------- .../pom.xml | 25 -- .../CustomTransitiveMetadataResolver.java | 4 +- ...codeTransferMedataFeignEnhancedPlugin.java | 2 +- ...nsferMedataRestTemplateEnhancedPlugin.java | 2 +- ...EncodeTransferMedataScgEnhancedPlugin.java | 2 +- ...TransferMedataWebClientEnhancedPlugin.java | 2 +- .../pom.xml | 59 ----- .../pom.xml | 100 +------- .../PolarisCircuitBreakerEndpoint.java | 4 +- .../PolarisCircuitBreakerMockServerTest.java | 2 +- .../PolarisCircuitBreakerEndpointTest.java | 2 +- .../pom.xml | 67 +----- .../polaris/config/ConfigurationModifier.java | 13 +- .../adapter/PolarisConfigFileLocator.java | 154 ++++++------- .../PolarisConfigPropertyAutoRefresher.java | 9 +- .../PolarisConfigAnnotationProcessor.java | 18 +- .../PolarisConfigChangeEventListener.java | 3 +- .../PolarisConfigListenerContext.java | 32 +-- .../annotation/SpringValueProcessor.java | 73 +++--- .../spring/property/PlaceholderHelper.java | 13 +- .../spring/property/SpringValueRegistry.java | 16 +- ...arisAdaptorTsfConfigAutoConfiguration.java | 2 + .../adapter/PolarisConfigFileLocatorTest.java | 7 +- .../endpoint/PolarisConfigEndpointTest.java | 4 +- .../listener/ConfigChangeListenerTest.java | 8 +- .../pom.xml | 22 +- .../contract/PolarisContractReporter.java | 2 +- .../pom.xml | 41 ---- .../PolarisDiscoveryAutoConfiguration.java | 13 +- .../discovery/PolarisServiceDiscovery.java | 13 +- .../PolarisServiceStatusChangeListener.java | 2 +- .../endpoint/PolarisDiscoveryEndpoint.java | 2 +- .../consul/ConsulDiscoveryConfigModifier.java | 4 +- .../extend/consul/ConsulDiscoveryUtil.java | 2 +- .../consul/ConsulHeartbeatProperties.java | 41 ++-- .../extend/nacos/NacosConfigModifier.java | 4 +- .../polaris/registry/PolarisRegistration.java | 4 +- .../registry/PolarisServiceRegistry.java | 2 +- .../tsf/TsfServletRegistrationCustomizer.java | 17 +- .../consul/ConsulHeartbeatPropertiesTest.java | 108 +++++++++ .../pom.xml | 85 ------- .../PolarisRateLimitRuleEndpoint.java | 4 +- .../context/CalleeControllerTests.java | 2 +- .../PolarisRateLimitRuleEndpointTests.java | 2 +- .../filter/QuotaCheckReactiveFilterTest.java | 12 +- .../filter/QuotaCheckServletFilterTest.java | 6 +- .../pom.xml | 70 +----- .../polaris/router/PolarisRouterContext.java | 4 +- .../polaris/router/RouterConfigModifier.java | 2 +- .../config/RouterAutoConfiguration.java | 2 +- .../endpoint/PolarisRouterEndpoint.java | 6 +- .../router/PolarisRouterContextTest.java | 10 +- spring-cloud-tencent-commons/pom.xml | 67 ++---- .../metadata/MetadataContextHolder.java | 13 +- .../metadata/StaticMetadataManager.java | 5 +- .../cloud/common/pojo/PolarisServer.java | 3 +- .../common/pojo/PolarisServiceInstance.java | 2 +- .../tencent/cloud/common/rule/Operation.java | 4 +- .../cloud/common/util/JacksonUtils.java | 5 + .../tencent/cloud/common/util/OkHttpUtil.java | 8 +- .../cloud/common/util/ZuulFilterUtils.java | 3 +- .../expresstion/ExpressionLabelUtils.java | 5 +- .../util/expresstion/ExpressionParserV1.java | 2 +- .../util/expresstion/ExpressionParserV2.java | 2 +- .../ServletExpressionLabelUtils.java | 4 +- .../SpringWebExpressionLabelUtils.java | 4 +- .../springframework/tsf/core/entity/Tag.java | 83 +++---- spring-cloud-tencent-coverage/pom.xml | 11 +- spring-cloud-tencent-dependencies/pom.xml | 51 ++-- .../MetadataMiddleServiceFallback.java | 5 +- .../MetadataBackendServiceFallback.java | 5 +- .../README-zh.md | 174 -------------- .../README.md | 179 --------------- .../base/base-backend/pom.xml | 16 -- .../basebackend/BackendController.java | 43 ---- .../basebackend/BaseBackendApplication.java | 34 --- .../src/main/resources/bootstrap.yml | 15 -- .../base/base-front/pom.xml | 16 -- .../basefront/BaseFrontApplication.java | 34 --- .../featureenv/basefront/FrontController.java | 50 ---- .../featureenv/basefront/MiddleService.java | 32 --- .../src/main/resources/bootstrap.yml | 15 -- .../base/base-middle/pom.xml | 18 -- .../featureenv/basemiddle/BackendService.java | 32 --- .../basemiddle/BaseMiddleApplication.java | 34 --- .../basemiddle/MiddleController.java | 50 ---- .../src/main/resources/bootstrap.yml | 15 -- .../base/pom.xml | 33 --- .../feature1/feature1-backend/pom.xml | 16 -- .../feature1backend/BackendController.java | 50 ---- .../Feature1BackendApplication.java | 34 --- .../src/main/resources/bootstrap.yml | 19 -- .../feature1/feature1-middle/pom.xml | 16 -- .../feature1middle/BackendService.java | 32 --- .../Feature1MiddleApplication.java | 34 --- .../feature1middle/MiddleController.java | 57 ----- .../src/main/resources/bootstrap.yml | 19 -- .../feature1/pom.xml | 32 --- .../feature2/feature2-backend/pom.xml | 16 -- .../feature2backend/BackendController.java | 50 ---- .../Feature2BackendApplication.java | 34 --- .../src/main/resources/bootstrap.yml | 19 -- .../feature2/feature2-front/pom.xml | 17 -- .../Feature2FrontApplication.java | 34 --- .../feature2front/FrontController.java | 57 ----- .../feature2front/MiddleService.java | 32 --- .../src/main/resources/bootstrap.yml | 19 -- .../feature2/pom.xml | 32 --- .../featureenv-gateway/pom.xml | 30 --- .../gateway/FeatureEnvScgApplication.java | 33 --- .../src/main/resources/bootstrap.yml | 68 ------ .../imgs/structs.png | Bin 56389 -> 0 bytes .../polaris-router-featureenv-example/pom.xml | 34 --- .../pom.xml | 5 +- .../pom.xml | 6 +- .../pom.xml | 6 +- .../router-grayrelease-lane-gateway/pom.xml | 6 +- spring-cloud-tencent-examples/pom.xml | 24 +- .../quickstart-callee-service-a/pom.xml | 29 --- .../quickstart-callee-service-b/pom.xml | 29 --- .../quickstart-caller-service/pom.xml | 29 --- .../quickstart-gateway-service/pom.xml | 34 --- .../tsf-example/consumer-demo/pom.xml | 29 --- .../tsf-example/provider-demo/pom.xml | 29 --- .../controller/SwaggerApiController.java | 6 +- spring-cloud-tencent-plugin-starters/pom.xml | 1 - .../pom.xml | 12 +- .../transformer/NacosInstanceTransformer.java | 2 + ...DiscoveryAdapterAutoConfigurationTest.java | 6 +- .../pom.xml | 18 +- .../pom.xml | 12 - ...itional-spring-configuration-metadata.json | 40 ---- .../pom.xml | 11 +- .../pom.xml | 6 +- .../pom.xml | 30 --- .../FeatureEnvAutoConfiguration.java | 44 ---- .../featureenv/FeatureEnvProperties.java | 38 --- .../FeatureEnvRouterRequestInterceptor.java | 66 ------ ...itional-spring-configuration-metadata.json | 10 - .../main/resources/META-INF/spring.factories | 2 - .../FeatureEnvAutoConfigurationTest.java | 58 ----- ...eatureEnvRouterRequestInterceptorTest.java | 105 --------- .../pom.xml | 42 +--- spring-cloud-tencent-polaris-context/pom.xml | 217 +----------------- .../cloud/polaris/context/ModifyAddress.java | 5 +- .../context/PostInitPolarisSDKContext.java | 2 +- .../config/PolarisContextProperties.java | 4 +- .../extend/consul/ConsulProperties.java | 2 - .../tsf/TsfCoreEnvironmentPostProcessor.java | 20 +- .../config/extend/tsf/TsfCoreProperties.java | 4 +- .../tsf/TsfInstanceMetadataProvider.java | 2 - .../pom.xml | 41 ++-- .../loadbalancer/PolarisLoadBalancer.java | 3 +- .../plugin/DefaultEnhancedPluginRunner.java | 4 +- .../plugin/PolarisEnhancedPluginUtils.java | 2 +- .../stat/config/PolarisStatProperties.java | 2 +- ...itional-spring-configuration-metadata.json | 2 +- 160 files changed, 674 insertions(+), 3464 deletions(-) create mode 100644 spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/extend/consul/ConsulHeartbeatPropertiesTest.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/README-zh.md delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/README.md delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/basebackend/BackendController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/basebackend/BaseBackendApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/BaseFrontApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/FrontController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/MiddleService.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/BackendService.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/BaseMiddleApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/MiddleController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/base/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1backend/BackendController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1backend/Feature1BackendApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/BackendService.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/Feature1MiddleApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/MiddleController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2backend/BackendController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2backend/Feature2BackendApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/Feature2FrontApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/FrontController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/MiddleService.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/src/main/java/com/tencent/cloud/polaris/featureenv/gateway/FeatureEnvScgApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/imgs/structs.png delete mode 100644 spring-cloud-tencent-examples/polaris-router-featureenv-example/pom.xml delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-gateway-plugin/src/main/resources/META-INF/additional-spring-configuration-metadata.json delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/pom.xml delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvAutoConfiguration.java delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvProperties.java delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvRouterRequestInterceptor.java delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/resources/META-INF/additional-spring-configuration-metadata.json delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/resources/META-INF/spring.factories delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/test/java/com/tencent/cloud/plugin/featureenv/FeatureEnvAutoConfigurationTest.java delete mode 100644 spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/test/java/com/tencent/cloud/plugin/featureenv/FeatureEnvRouterRequestInterceptorTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md index daf24404e3..c2518b95fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,4 +29,5 @@ - [feat:support polaris event.](https://github.com/Tencent/spring-cloud-tencent/pull/1543) - [feat:support circuit breaker metrics reporting.](https://github.com/Tencent/spring-cloud-tencent/pull/1544) - [feat: support gateway context, feign eager-load support default value.](https://github.com/Tencent/spring-cloud-tencent/pull/1545) +- [feat:use polaris-all for shading third-party dependencies.](https://github.com/Tencent/spring-cloud-tencent/pull/1549) diff --git a/pom.xml b/pom.xml index 6905732c91..ec1c750869 100644 --- a/pom.xml +++ b/pom.xml @@ -108,7 +108,8 @@ 3.2.0 1.2.7 3.0.1 - 3.4.1 + 3.5.1 + 3.4.0 true @@ -166,6 +167,38 @@ + + + org.slf4j + slf4j-api + provided + + + + org.springframework.boot + spring-boot-starter-logging + test + + + + org.springframework.boot + spring-boot-starter-test + test + + + + uk.org.webcompere + system-stubs-jupiter + test + + + + io.projectreactor + reactor-test + test + + + @@ -179,6 +212,11 @@ maven-shade-plugin ${maven-shade-plugin.version} + + org.apache.maven.plugins + maven-clean-plugin + ${maven-clean-plugin.version} + @@ -186,6 +224,20 @@ org.apache.maven.plugins maven-checkstyle-plugin + + org.apache.maven.plugins + maven-clean-plugin + + + + ${project.basedir} + + dependency-reduced-pom.xml + + + + + org.apache.maven.plugins maven-compiler-plugin diff --git a/spring-cloud-starter-tencent-all/pom.xml b/spring-cloud-starter-tencent-all/pom.xml index b4c07bf58d..c8a70ee68f 100644 --- a/spring-cloud-starter-tencent-all/pom.xml +++ b/spring-cloud-starter-tencent-all/pom.xml @@ -68,83 +68,6 @@ com.tencent.cloud spring-cloud-starter-tencent-fault-tolerance - - - org.springframework.boot - spring-boot-starter-logging - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - package - - jar - - - - - - org.apache.maven.plugins - maven-shade-plugin - - false - - - - sct-all-shade - - shade - - - true - - - *:* - - META-INF/*.MF - META-INF/NOTICE - META-INF/DEPENDENCIES - META-INF/LICENSE - META-INF/NOTICE.txt - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - META-INF/*.RSA - META-INF/io.netty.versions.properties - module-info.java - module-info.class - - - - - - - - META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports - - - - - META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports - - - - - - - - - diff --git a/spring-cloud-starter-tencent-metadata-transfer/pom.xml b/spring-cloud-starter-tencent-metadata-transfer/pom.xml index 34658ad478..86a43d3f9d 100644 --- a/spring-cloud-starter-tencent-metadata-transfer/pom.xml +++ b/spring-cloud-starter-tencent-metadata-transfer/pom.xml @@ -19,7 +19,6 @@ com.tencent.cloud spring-cloud-tencent-rpc-enhancement - @@ -46,35 +45,11 @@ true - - org.springframework.boot - spring-boot-starter-test - test - - org.springframework.cloud spring-cloud-starter-netflix-ribbon test - - - com.tencent.polaris - polaris-test-mock-discovery - test - - - - com.tencent.polaris - polaris-test-common - test - - - - org.mockito - mockito-inline - test - diff --git a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/CustomTransitiveMetadataResolver.java b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/CustomTransitiveMetadataResolver.java index 392f4c6da3..945abc5aca 100644 --- a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/CustomTransitiveMetadataResolver.java +++ b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/CustomTransitiveMetadataResolver.java @@ -25,10 +25,10 @@ import javax.servlet.http.HttpServletRequest; import com.tencent.cloud.common.constant.MetadataConstant; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.springframework.http.HttpHeaders; -import org.springframework.util.CollectionUtils; import org.springframework.web.server.ServerWebExchange; /** diff --git a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataFeignEnhancedPlugin.java b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataFeignEnhancedPlugin.java index 30f71ea2e5..8bc34cff0a 100644 --- a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataFeignEnhancedPlugin.java +++ b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataFeignEnhancedPlugin.java @@ -22,7 +22,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import com.google.common.collect.ImmutableMap; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.common.metadata.MetadataContextHolder; import com.tencent.cloud.common.util.JacksonUtils; @@ -35,6 +34,7 @@ import com.tencent.polaris.metadata.core.MessageMetadataContainer; import com.tencent.polaris.metadata.core.MetadataType; import feign.Request; +import shade.polaris.com.google.common.collect.ImmutableMap; import org.springframework.util.CollectionUtils; diff --git a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataRestTemplateEnhancedPlugin.java b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataRestTemplateEnhancedPlugin.java index 0f68dc23df..d94a28e709 100644 --- a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataRestTemplateEnhancedPlugin.java +++ b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataRestTemplateEnhancedPlugin.java @@ -19,7 +19,6 @@ import java.util.Map; -import com.google.common.collect.ImmutableMap; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.common.metadata.MetadataContextHolder; import com.tencent.cloud.common.util.JacksonUtils; @@ -30,6 +29,7 @@ import com.tencent.cloud.rpc.enhancement.plugin.PluginOrderConstant; import com.tencent.polaris.metadata.core.MessageMetadataContainer; import com.tencent.polaris.metadata.core.MetadataType; +import shade.polaris.com.google.common.collect.ImmutableMap; import org.springframework.http.HttpRequest; import org.springframework.util.CollectionUtils; diff --git a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataScgEnhancedPlugin.java b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataScgEnhancedPlugin.java index 5f56e36867..64e8b7ede3 100644 --- a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataScgEnhancedPlugin.java +++ b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataScgEnhancedPlugin.java @@ -19,7 +19,6 @@ import java.util.Map; -import com.google.common.collect.ImmutableMap; import com.tencent.cloud.common.constant.MetadataConstant; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.common.metadata.MetadataContextHolder; @@ -31,6 +30,7 @@ import com.tencent.cloud.rpc.enhancement.plugin.PluginOrderConstant; import com.tencent.polaris.metadata.core.MessageMetadataContainer; import com.tencent.polaris.metadata.core.MetadataType; +import shade.polaris.com.google.common.collect.ImmutableMap; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.util.CollectionUtils; diff --git a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataWebClientEnhancedPlugin.java b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataWebClientEnhancedPlugin.java index 8713f8a5b3..4b3109a65e 100644 --- a/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataWebClientEnhancedPlugin.java +++ b/spring-cloud-starter-tencent-metadata-transfer/src/main/java/com/tencent/cloud/metadata/core/EncodeTransferMedataWebClientEnhancedPlugin.java @@ -19,7 +19,6 @@ import java.util.Map; -import com.google.common.collect.ImmutableMap; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.common.metadata.MetadataContextHolder; import com.tencent.cloud.common.util.JacksonUtils; @@ -30,6 +29,7 @@ import com.tencent.cloud.rpc.enhancement.plugin.PluginOrderConstant; import com.tencent.polaris.metadata.core.MessageMetadataContainer; import com.tencent.polaris.metadata.core.MetadataType; +import shade.polaris.com.google.common.collect.ImmutableMap; import org.springframework.util.CollectionUtils; import org.springframework.web.reactive.function.client.ClientRequest; diff --git a/spring-cloud-starter-tencent-polaris-auth/pom.xml b/spring-cloud-starter-tencent-polaris-auth/pom.xml index c3fe3df236..cd5f604fc4 100644 --- a/spring-cloud-starter-tencent-polaris-auth/pom.xml +++ b/spring-cloud-starter-tencent-polaris-auth/pom.xml @@ -14,47 +14,12 @@ - - com.tencent.cloud - spring-cloud-tencent-rpc-enhancement - - com.tencent.cloud spring-cloud-starter-tencent-metadata-transfer - - - com.tencent.polaris - polaris-auth-factory - - - - com.tencent.polaris - auth-block-allow-list - - - - com.tencent.polaris - polaris-test-common - test - - - - com.tencent.polaris - polaris-test-mock-discovery - test - - - junit - junit - - - - - org.springframework.boot spring-boot-starter-web @@ -67,12 +32,6 @@ true - - org.springframework.boot - spring-boot-starter-test - test - - org.springframework.boot spring-boot-actuator @@ -84,23 +43,5 @@ spring-boot-actuator-autoconfigure true - - - org.mockito - mockito-inline - test - - - - org.mockito - mockito-core - test - - - - net.bytebuddy - byte-buddy - test - \ No newline at end of file diff --git a/spring-cloud-starter-tencent-polaris-circuitbreaker/pom.xml b/spring-cloud-starter-tencent-polaris-circuitbreaker/pom.xml index 7525a4c921..5fd9e8fb8e 100644 --- a/spring-cloud-starter-tencent-polaris-circuitbreaker/pom.xml +++ b/spring-cloud-starter-tencent-polaris-circuitbreaker/pom.xml @@ -14,6 +14,12 @@ + + com.tencent.cloud + spring-cloud-tencent-rpc-enhancement + + + org.springframework.boot spring-boot-starter-web @@ -37,75 +43,11 @@ spring-cloud-starter-gateway true - org.springframework.cloud spring-cloud-starter-netflix-zuul true - - - com.tencent.cloud - spring-cloud-tencent-rpc-enhancement - - - - - - com.tencent.polaris - polaris-circuitbreaker-factory - - - com.tencent.polaris - router-rule - - - com.tencent.polaris - router-nearby - - - com.tencent.polaris - router-namespace - - - com.tencent.polaris - router-metadata - - - com.tencent.polaris - router-canary - - - com.tencent.polaris - router-set - - - com.tencent.polaris - router-isolated - - - com.tencent.polaris - router-healthy - - - - - - com.tencent.polaris - healthchecker-http - - - - com.tencent.polaris - healthchecker-udp - - - - com.tencent.polaris - healthchecker-tcp - - - org.springframework.boot spring-boot-actuator @@ -117,35 +59,5 @@ spring-boot-actuator-autoconfigure true - - - org.springframework.boot - spring-boot-starter-test - test - - - - com.tencent.polaris - polaris-test-common - test - - - - com.tencent.polaris - polaris-test-mock-discovery - test - - - - org.mockito - mockito-inline - test - - - - io.projectreactor - reactor-test - test - diff --git a/spring-cloud-starter-tencent-polaris-circuitbreaker/src/main/java/com/tencent/cloud/polaris/circuitbreaker/endpoint/PolarisCircuitBreakerEndpoint.java b/spring-cloud-starter-tencent-polaris-circuitbreaker/src/main/java/com/tencent/cloud/polaris/circuitbreaker/endpoint/PolarisCircuitBreakerEndpoint.java index 35f9c7cd3e..98ddb98c0f 100644 --- a/spring-cloud-starter-tencent-polaris-circuitbreaker/src/main/java/com/tencent/cloud/polaris/circuitbreaker/endpoint/PolarisCircuitBreakerEndpoint.java +++ b/spring-cloud-starter-tencent-polaris-circuitbreaker/src/main/java/com/tencent/cloud/polaris/circuitbreaker/endpoint/PolarisCircuitBreakerEndpoint.java @@ -22,8 +22,6 @@ import java.util.List; import java.util.Map; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.util.JsonFormat; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.common.util.JacksonUtils; import com.tencent.cloud.polaris.context.ServiceRuleManager; @@ -31,6 +29,8 @@ import com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import shade.polaris.com.google.protobuf.InvalidProtocolBufferException; +import shade.polaris.com.google.protobuf.util.JsonFormat; import org.springframework.boot.actuate.endpoint.annotation.Endpoint; import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; diff --git a/spring-cloud-starter-tencent-polaris-circuitbreaker/src/test/java/com/tencent/cloud/polaris/circuitbreaker/PolarisCircuitBreakerMockServerTest.java b/spring-cloud-starter-tencent-polaris-circuitbreaker/src/test/java/com/tencent/cloud/polaris/circuitbreaker/PolarisCircuitBreakerMockServerTest.java index 95c34a578c..81c3bf7b7d 100644 --- a/spring-cloud-starter-tencent-polaris-circuitbreaker/src/test/java/com/tencent/cloud/polaris/circuitbreaker/PolarisCircuitBreakerMockServerTest.java +++ b/spring-cloud-starter-tencent-polaris-circuitbreaker/src/test/java/com/tencent/cloud/polaris/circuitbreaker/PolarisCircuitBreakerMockServerTest.java @@ -27,7 +27,6 @@ import java.util.List; import java.util.stream.Collectors; -import com.google.protobuf.util.JsonFormat; import com.tencent.cloud.common.util.ApplicationContextAwareUtils; import com.tencent.cloud.polaris.circuitbreaker.config.PolarisCircuitBreakerProperties; import com.tencent.cloud.polaris.context.PolarisSDKContextManager; @@ -49,6 +48,7 @@ import org.mockito.MockedStatic; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; +import shade.polaris.com.google.protobuf.util.JsonFormat; import org.springframework.cloud.client.circuitbreaker.CircuitBreaker; diff --git a/spring-cloud-starter-tencent-polaris-circuitbreaker/src/test/java/com/tencent/cloud/polaris/circuitbreaker/endpoint/PolarisCircuitBreakerEndpointTest.java b/spring-cloud-starter-tencent-polaris-circuitbreaker/src/test/java/com/tencent/cloud/polaris/circuitbreaker/endpoint/PolarisCircuitBreakerEndpointTest.java index 767978d15c..81503e1442 100644 --- a/spring-cloud-starter-tencent-polaris-circuitbreaker/src/test/java/com/tencent/cloud/polaris/circuitbreaker/endpoint/PolarisCircuitBreakerEndpointTest.java +++ b/spring-cloud-starter-tencent-polaris-circuitbreaker/src/test/java/com/tencent/cloud/polaris/circuitbreaker/endpoint/PolarisCircuitBreakerEndpointTest.java @@ -19,7 +19,6 @@ import java.util.Map; -import com.google.protobuf.StringValue; import com.tencent.cloud.common.util.ApplicationContextAwareUtils; import com.tencent.cloud.polaris.context.ServiceRuleManager; import com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto; @@ -28,6 +27,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; +import shade.polaris.com.google.protobuf.StringValue; import org.springframework.boot.test.context.runner.ApplicationContextRunner; diff --git a/spring-cloud-starter-tencent-polaris-config/pom.xml b/spring-cloud-starter-tencent-polaris-config/pom.xml index 01c04fb979..5f1a7a46ed 100644 --- a/spring-cloud-starter-tencent-polaris-config/pom.xml +++ b/spring-cloud-starter-tencent-polaris-config/pom.xml @@ -18,56 +18,19 @@ com.tencent.cloud spring-cloud-tencent-polaris-context - - - - - - com.tencent.polaris - polaris-configuration-factory - com.tencent.polaris - router-rule - - - com.tencent.polaris - router-nearby - - - com.tencent.polaris - router-namespace - - - com.tencent.polaris - router-metadata - - - com.tencent.polaris - router-canary - - - com.tencent.polaris - router-set - - - com.tencent.polaris - router-isolated - - - com.tencent.polaris - router-healthy + spring-security-crypto + org.springframework.security - - - + - org.springframework.boot - spring-boot-starter-test - test + org.springframework + spring-web + true @@ -81,23 +44,5 @@ spring-boot-actuator-autoconfigure true - - - org.mockito - mockito-inline - test - - - - org.mockito - mockito-core - test - - - - net.bytebuddy - byte-buddy - test - diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/ConfigurationModifier.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/ConfigurationModifier.java index fa91e36b7b..4cd01eb353 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/ConfigurationModifier.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/ConfigurationModifier.java @@ -28,10 +28,10 @@ import com.tencent.cloud.polaris.context.PolarisConfigurationConfigModifier; import com.tencent.cloud.polaris.context.config.PolarisContextProperties; import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.factory.config.ConfigurationImpl; import com.tencent.polaris.factory.config.configuration.ConfigFilterConfigImpl; import com.tencent.polaris.factory.config.configuration.ConnectorConfigImpl; -import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -137,8 +137,15 @@ private List resolveConfigAddressFromPolarisAddress(String polarisAddres List configAddresses = new ArrayList<>(polarisAddresses.size()); for (String address : polarisAddresses) { - String ip = StringUtils.substringBeforeLast(address, ":"); - configAddresses.add(ip + ":" + polarisConfigProperties.getPort()); + if (StringUtils.isNotBlank(address)) { + int pos = address.lastIndexOf(":"); + if (pos != -1) { + configAddresses.add(address.substring(0, pos) + ":" + polarisConfigProperties.getPort()); + } + else { + configAddresses.add(address); + } + } } return configAddresses; diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigFileLocator.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigFileLocator.java index 51672a8cb0..0a3f5d9e8f 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigFileLocator.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigFileLocator.java @@ -29,12 +29,13 @@ import com.tencent.cloud.polaris.config.enums.ConfigFileFormat; import com.tencent.cloud.polaris.context.config.PolarisContextProperties; import com.tencent.polaris.api.utils.ClassUtils; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.configuration.api.core.ConfigFileMetadata; import com.tencent.polaris.configuration.api.core.ConfigFileService; import com.tencent.polaris.configuration.api.core.ConfigKVFile; import com.tencent.polaris.configuration.client.internal.CompositeConfigFile; import com.tencent.polaris.configuration.client.internal.DefaultConfigFileMetadata; -import org.apache.commons.lang.ArrayUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,8 +44,6 @@ import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.Environment; import org.springframework.core.env.PropertySource; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; /** * Spring cloud reserved core configuration loading SPI. @@ -59,19 +58,14 @@ public class PolarisConfigFileLocator implements PropertySourceLocator { private static final Logger LOGGER = LoggerFactory.getLogger(PolarisConfigFileLocator.class); private static final String POLARIS_CONFIG_PROPERTY_SOURCE_NAME = "polaris-config"; - + private volatile static CompositePropertySource compositePropertySourceCache = null; private final PolarisConfigProperties polarisConfigProperties; - private final PolarisContextProperties polarisContextProperties; - private final ConfigFileService configFileService; - private final Environment environment; // this class provides customized logic for some customers to configure special business group files private final PolarisConfigCustomExtensionLayer polarisConfigCustomExtensionLayer = PolarisServiceLoaderUtil.getPolarisConfigCustomExtensionLayer(); - private volatile static CompositePropertySource compositePropertySourceCache = null; - public PolarisConfigFileLocator(PolarisConfigProperties polarisConfigProperties, PolarisContextProperties polarisContextProperties, ConfigFileService configFileService, Environment environment) { this.polarisConfigProperties = polarisConfigProperties; @@ -80,6 +74,65 @@ public PolarisConfigFileLocator(PolarisConfigProperties polarisConfigProperties, this.environment = environment; } + public static PolarisPropertySource loadPolarisPropertySource(ConfigFileService configFileService, String namespace, String group, String fileName) { + ConfigKVFile configKVFile = loadConfigKVFile(configFileService, namespace, group, fileName); + + Map map = new ConcurrentHashMap<>(); + for (String key : configKVFile.getPropertyNames()) { + map.put(key, configKVFile.getProperty(key, null)); + } + + return new PolarisPropertySource(namespace, group, fileName, configKVFile, map); + } + + public static PolarisPropertySource loadGroupPolarisPropertySource(ConfigFileService configFileService, String namespace, String group) { + List configKVFiles = new ArrayList<>(); + + com.tencent.polaris.configuration.api.core.ConfigFileGroup remoteGroup = configFileService.getConfigFileGroup(namespace, group); + if (remoteGroup == null) { + return null; + } + + for (ConfigFileMetadata configFile : remoteGroup.getConfigFileMetadataList()) { + String fileName = configFile.getFileName(); + ConfigKVFile configKVFile = loadConfigKVFile(configFileService, namespace, group, fileName); + configKVFiles.add(configKVFile); + } + + CompositeConfigFile compositeConfigFile = new CompositeConfigFile(configKVFiles); + + Map map = new ConcurrentHashMap<>(); + for (String key : compositeConfigFile.getPropertyNames()) { + String value = compositeConfigFile.getProperty(key, null); + map.put(key, value); + } + + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("namespace='" + namespace + '\'' + + ", group='" + group + '\'' + ", fileName='" + compositeConfigFile + '\'' + + ", map='" + map + '\''); + } + + return new PolarisPropertySource(namespace, group, "", compositeConfigFile, map); + } + + public static ConfigKVFile loadConfigKVFile(ConfigFileService configFileService, String namespace, String group, String fileName) { + ConfigKVFile configKVFile; + // unknown extension is resolved as properties file + if (ConfigFileFormat.isPropertyFile(fileName) || ConfigFileFormat.isUnknownFile(fileName)) { + configKVFile = configFileService.getConfigPropertiesFile(namespace, group, fileName); + } + else if (ConfigFileFormat.isYamlFile(fileName)) { + configKVFile = configFileService.getConfigYamlFile(namespace, group, fileName); + } + else { + LOGGER.warn("[SCT Config] Unsupported config file. namespace = {}, group = {}, fileName = {}", namespace, group, fileName); + + throw new IllegalStateException("Only configuration files in the format of properties / yaml / yaml" + " can be injected into the spring context"); + } + return configKVFile; + } + /** * order: spring boot default config files > custom config files > tsf default config group. * @param environment The current Environment. @@ -102,7 +155,7 @@ public PropertySource locate(Environment environment) { initInternalConfigFiles(compositePropertySource); // load custom config files List configFileGroups = polarisConfigProperties.getGroups(); - if (!CollectionUtils.isEmpty(configFileGroups)) { + if (CollectionUtils.isNotEmpty(configFileGroups)) { initCustomPolarisConfigFiles(compositePropertySource, configFileGroups); } // load tsf default config group @@ -155,7 +208,7 @@ private void initInternalConfigFiles(CompositePropertySource compositePropertySo private List getInternalConfigFiles() { String namespace = polarisContextProperties.getNamespace(); String serviceName = polarisContextProperties.getService(); - if (!StringUtils.hasText(serviceName)) { + if (StringUtils.isBlank(serviceName)) { serviceName = environment.getProperty("spring.application.name"); } @@ -165,10 +218,10 @@ private List getInternalConfigFiles() { String[] activeProfiles = environment.getActiveProfiles(); String[] defaultProfiles = environment.getDefaultProfiles(); List profileList = new ArrayList<>(); - if (ArrayUtils.isNotEmpty(activeProfiles)) { + if (CollectionUtils.isNotEmpty(activeProfiles)) { profileList.addAll(Arrays.asList(activeProfiles)); } - else if (ArrayUtils.isNotEmpty(defaultProfiles)) { + else if (CollectionUtils.isNotEmpty(defaultProfiles)) { profileList.addAll(Arrays.asList(defaultProfiles)); } // build application config files @@ -181,7 +234,7 @@ else if (ArrayUtils.isNotEmpty(defaultProfiles)) { private void buildInternalApplicationConfigFiles(List internalConfigFiles, String namespace, String serviceName, List profileList) { for (String profile : profileList) { - if (!StringUtils.hasText(profile)) { + if (StringUtils.isBlank(profile)) { continue; } internalConfigFiles.add(new DefaultConfigFileMetadata(namespace, serviceName, "application-" + profile + ".properties")); @@ -196,7 +249,7 @@ private void buildInternalApplicationConfigFiles(List intern private void buildInternalBootstrapConfigFiles(List internalConfigFiles, String namespace, String serviceName, List profileList) { for (String profile : profileList) { - if (!StringUtils.hasText(profile)) { + if (StringUtils.isBlank(profile)) { continue; } internalConfigFiles.add(new DefaultConfigFileMetadata(namespace, serviceName, "bootstrap-" + profile + ".properties")); @@ -209,7 +262,7 @@ private void buildInternalBootstrapConfigFiles(List internal internalConfigFiles.add(new DefaultConfigFileMetadata(namespace, serviceName, "bootstrap.yaml")); } - private void initTsfConfigGroups(CompositePropertySource compositePropertySource) { + void initTsfConfigGroups(CompositePropertySource compositePropertySource) { String tsfId = environment.getProperty("tsf_id"); String tsfNamespaceName = environment.getProperty("tsf_namespace_name"); String tsfGroupName = environment.getProperty("tsf_group_name"); @@ -219,11 +272,11 @@ private void initTsfConfigGroups(CompositePropertySource compositePropertySource } String namespace = polarisContextProperties.getNamespace(); List tsfConfigGroups = new ArrayList<>(); - tsfConfigGroups.add((StringUtils.hasText(tsfId) ? tsfId + "." : "") + tsfGroupName + ".application_config_group"); - tsfConfigGroups.add((StringUtils.hasText(tsfId) ? tsfId + "." : "") + tsfNamespaceName + ".global_config_group"); + tsfConfigGroups.add((StringUtils.isNotBlank(tsfId) ? tsfId + "." : "") + tsfGroupName + ".application_config_group"); + tsfConfigGroups.add((StringUtils.isNotBlank(tsfId) ? tsfId + "." : "") + tsfNamespaceName + ".global_config_group"); if (ClassUtils.isClassPresent("org.springframework.cloud.gateway.filter.GlobalFilter")) { - tsfConfigGroups.add((StringUtils.hasText(tsfId) ? tsfId + "." : "") + tsfGroupName + ".gateway_config_group"); + tsfConfigGroups.add((StringUtils.isNotBlank(tsfId) ? tsfId + "." : "") + tsfGroupName + ".gateway_config_group"); } for (String tsfConfigGroup : tsfConfigGroups) { PolarisPropertySource polarisPropertySource = loadGroupPolarisPropertySource(configFileService, namespace, tsfConfigGroup); @@ -241,12 +294,12 @@ private void initCustomPolarisConfigFiles(CompositePropertySource compositePrope for (ConfigFileGroup configFileGroup : configFileGroups) { String groupNamespace = configFileGroup.getNamespace(); - if (!StringUtils.hasText(groupNamespace)) { + if (StringUtils.isBlank(groupNamespace)) { groupNamespace = namespace; } String group = configFileGroup.getName(); - if (!StringUtils.hasText(group)) { + if (StringUtils.isBlank(group)) { continue; } @@ -274,63 +327,4 @@ private void initCustomPolarisConfigFiles(CompositePropertySource compositePrope } } } - - public static PolarisPropertySource loadPolarisPropertySource(ConfigFileService configFileService, String namespace, String group, String fileName) { - ConfigKVFile configKVFile = loadConfigKVFile(configFileService, namespace, group, fileName); - - Map map = new ConcurrentHashMap<>(); - for (String key : configKVFile.getPropertyNames()) { - map.put(key, configKVFile.getProperty(key, null)); - } - - return new PolarisPropertySource(namespace, group, fileName, configKVFile, map); - } - - public static PolarisPropertySource loadGroupPolarisPropertySource(ConfigFileService configFileService, String namespace, String group) { - List configKVFiles = new ArrayList<>(); - - com.tencent.polaris.configuration.api.core.ConfigFileGroup remoteGroup = configFileService.getConfigFileGroup(namespace, group); - if (remoteGroup == null) { - return null; - } - - for (ConfigFileMetadata configFile : remoteGroup.getConfigFileMetadataList()) { - String fileName = configFile.getFileName(); - ConfigKVFile configKVFile = loadConfigKVFile(configFileService, namespace, group, fileName); - configKVFiles.add(configKVFile); - } - - CompositeConfigFile compositeConfigFile = new CompositeConfigFile(configKVFiles); - - Map map = new ConcurrentHashMap<>(); - for (String key : compositeConfigFile.getPropertyNames()) { - String value = compositeConfigFile.getProperty(key, null); - map.put(key, value); - } - - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("namespace='" + namespace + '\'' - + ", group='" + group + '\'' + ", fileName='" + compositeConfigFile + '\'' - + ", map='" + map + '\''); - } - - return new PolarisPropertySource(namespace, group, "", compositeConfigFile, map); - } - - public static ConfigKVFile loadConfigKVFile(ConfigFileService configFileService, String namespace, String group, String fileName) { - ConfigKVFile configKVFile; - // unknown extension is resolved as properties file - if (ConfigFileFormat.isPropertyFile(fileName) || ConfigFileFormat.isUnknownFile(fileName)) { - configKVFile = configFileService.getConfigPropertiesFile(namespace, group, fileName); - } - else if (ConfigFileFormat.isYamlFile(fileName)) { - configKVFile = configFileService.getConfigYamlFile(namespace, group, fileName); - } - else { - LOGGER.warn("[SCT Config] Unsupported config file. namespace = {}, group = {}, fileName = {}", namespace, group, fileName); - - throw new IllegalStateException("Only configuration files in the format of properties / yaml / yaml" + " can be injected into the spring context"); - } - return configKVFile; - } } diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigPropertyAutoRefresher.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigPropertyAutoRefresher.java index cdd31b7c39..c30f13d9cc 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigPropertyAutoRefresher.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigPropertyAutoRefresher.java @@ -26,7 +26,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; -import com.google.common.collect.Sets; import com.tencent.cloud.polaris.config.config.PolarisConfigProperties; import com.tencent.cloud.polaris.config.logger.PolarisConfigLoggerContext; import com.tencent.cloud.polaris.config.utils.PolarisPropertySourceUtils; @@ -39,6 +38,7 @@ import com.tencent.polaris.configuration.client.internal.CompositeConfigFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import shade.polaris.com.google.common.collect.Sets; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; @@ -55,16 +55,11 @@ public abstract class PolarisConfigPropertyAutoRefresher implements ApplicationListener, PolarisConfigPropertyRefresher { private static final Logger LOGGER = LoggerFactory.getLogger(PolarisConfigPropertyAutoRefresher.class); - + private static final Set registeredPolarisPropertySets = Sets.newConcurrentHashSet(); private final PolarisConfigProperties polarisConfigProperties; - private final AtomicBoolean registered = new AtomicBoolean(false); - // this class provides customized logic for some customers to configure special business group files private final PolarisConfigCustomExtensionLayer polarisConfigCustomExtensionLayer = PolarisServiceLoaderUtil.getPolarisConfigCustomExtensionLayer(); - - private static final Set registeredPolarisPropertySets = Sets.newConcurrentHashSet(); - private final ConfigFileService configFileService; public PolarisConfigPropertyAutoRefresher(PolarisConfigProperties polarisConfigProperties, diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigAnnotationProcessor.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigAnnotationProcessor.java index 16c3d42bfe..8a1fbb1170 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigAnnotationProcessor.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigAnnotationProcessor.java @@ -18,15 +18,16 @@ package com.tencent.cloud.polaris.config.annotation; import java.lang.reflect.Method; +import java.util.Collections; +import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; -import com.google.common.base.Preconditions; -import com.google.common.collect.Sets; import com.tencent.cloud.polaris.config.listener.ConfigChangeEvent; import com.tencent.cloud.polaris.config.listener.ConfigChangeListener; import com.tencent.cloud.polaris.config.listener.SyncConfigChangeListener; +import shade.polaris.com.google.common.base.Preconditions; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; @@ -104,11 +105,14 @@ public boolean isAsync() { } }; - Set interestedKeys = - annotatedInterestedKeys.length > 0 ? Sets.newHashSet(annotatedInterestedKeys) : null; - Set interestedKeyPrefixes = - annotatedInterestedKeyPrefixes.length > 0 ? Sets.newHashSet(annotatedInterestedKeyPrefixes) - : null; + Set interestedKeys = new HashSet<>(); + if (annotatedInterestedKeys.length > 0) { + Collections.addAll(interestedKeys, annotatedInterestedKeys); + } + Set interestedKeyPrefixes = new HashSet<>(); + if (annotatedInterestedKeyPrefixes.length > 0) { + Collections.addAll(interestedKeyPrefixes, annotatedInterestedKeyPrefixes); + } addChangeListener(configChangeListener, interestedKeys, interestedKeyPrefixes); } diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigChangeEventListener.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigChangeEventListener.java index 9da4bbe6fb..b1c2dd350e 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigChangeEventListener.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigChangeEventListener.java @@ -22,7 +22,6 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -import com.google.common.collect.Maps; import com.tencent.cloud.polaris.config.spring.event.ConfigChangeSpringEvent; import com.tencent.polaris.configuration.api.core.ConfigPropertyChangeInfo; import org.slf4j.Logger; @@ -96,7 +95,7 @@ public void onApplicationEvent(@NonNull ApplicationEvent event) { */ @SuppressWarnings("unchecked") private Map loadEnvironmentProperties(ConfigurableEnvironment environment) { - Map ret = Maps.newHashMap(); + Map ret = new HashMap<>(); MutablePropertySources sources = environment.getPropertySources(); sources.iterator().forEachRemaining(propertySource -> { // Don't read system env variable. diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigListenerContext.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigListenerContext.java index 6f66712b87..519ca7a0e9 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigListenerContext.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigListenerContext.java @@ -17,26 +17,28 @@ package com.tencent.cloud.polaris.config.listener; +import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; +import com.tencent.polaris.api.utils.CollectionUtils; import com.tencent.polaris.configuration.api.core.ConfigKVFileChangeListener; import com.tencent.polaris.configuration.api.core.ConfigPropertyChangeInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import shade.polaris.com.google.common.cache.Cache; +import shade.polaris.com.google.common.cache.CacheBuilder; import org.springframework.lang.NonNull; import org.springframework.lang.Nullable; @@ -65,15 +67,15 @@ public final class PolarisConfigListenerContext { /** * All custom {@link ConfigChangeListener} instance defined in application . */ - private static final List listeners = Lists.newCopyOnWriteArrayList(); + private static final List listeners = new CopyOnWriteArrayList<>(); /** * All custom interested keys defined in application . */ - private static final Map> interestedKeys = Maps.newConcurrentMap(); + private static final Map> interestedKeys = new ConcurrentHashMap<>(); /** * All custom interested key prefixes defined in application . */ - private static final Map> interestedKeyPrefixes = Maps.newConcurrentMap(); + private static final Map> interestedKeyPrefixes = new ConcurrentHashMap<>(); /** * Cache all latest configuration information for users in the application environment . */ @@ -129,11 +131,11 @@ static void initialize(Map ret) { * @return merged properties result map */ static Map merge(Map ret) { - Map changes = Maps.newHashMap(); + Map changes = new HashMap<>(); if (!ret.isEmpty()) { - Map origin = Maps.newHashMap(properties.asMap()); - Map deleted = Maps.newHashMap(); + Map origin = new HashMap<>(properties.asMap()); + Map deleted = new HashMap<>(); origin.keySet().parallelStream().forEach(key -> { if (!ret.containsKey(key)) { @@ -175,8 +177,8 @@ public static void addChangeListener(@NonNull ConfigChangeListener listener, @Nullable Set interestedKeys, @Nullable Set interestedKeyPrefixes) { if (!listeners.contains(listener)) { listeners.add(listener); - PolarisConfigListenerContext.interestedKeys.put(listener, interestedKeys == null ? Sets.newHashSet() : interestedKeys); - PolarisConfigListenerContext.interestedKeyPrefixes.put(listener, interestedKeyPrefixes == null ? Sets.newHashSet() : interestedKeyPrefixes); + PolarisConfigListenerContext.interestedKeys.put(listener, CollectionUtils.isEmpty(interestedKeys) ? new HashSet<>() : interestedKeys); + PolarisConfigListenerContext.interestedKeyPrefixes.put(listener, CollectionUtils.isEmpty(interestedKeyPrefixes) ? new HashSet<>() : interestedKeyPrefixes); } } @@ -211,7 +213,7 @@ public static void fireConfigChange(Set changedKeys, Map findMatchedConfigChangeListeners(Set changedKeys) { - final List configChangeListeners = Lists.newArrayList(); + final List configChangeListeners = new ArrayList<>(); for (ConfigChangeListener listener : listeners) { if (isConfigChangeListenerInterested(listener, changedKeys)) { configChangeListeners.add(listener); @@ -262,7 +264,7 @@ private static boolean isConfigChangeListenerInterested(ConfigChangeListener lis * @return set of all interested keys in listener */ private static Set resolveInterestedChangedKeys(ConfigChangeListener listener, Set changedKeys) { - Set interestedChangedKeys = Sets.newHashSet(); + Set interestedChangedKeys = new HashSet<>(); if (interestedKeys.containsKey(listener)) { Set interestedKeys = PolarisConfigListenerContext.interestedKeys.get(listener); diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessor.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessor.java index 19e4a0f569..200ac9f736 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessor.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessor.java @@ -26,12 +26,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; -import com.google.common.base.CaseFormat; -import com.google.common.collect.LinkedListMultimap; -import com.google.common.collect.Maps; -import com.google.common.collect.Multimap; -import com.google.common.collect.Sets; import com.tencent.cloud.polaris.config.config.PolarisConfigProperties; import com.tencent.cloud.polaris.config.spring.property.PlaceholderHelper; import com.tencent.cloud.polaris.config.spring.property.SpringValue; @@ -40,6 +36,10 @@ import com.tencent.polaris.api.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import shade.polaris.com.google.common.base.CaseFormat; +import shade.polaris.com.google.common.collect.LinkedListMultimap; +import shade.polaris.com.google.common.collect.Multimap; +import shade.polaris.com.google.common.collect.Sets; import org.springframework.beans.BeanUtils; import org.springframework.beans.BeansException; @@ -73,7 +73,7 @@ public class SpringValueProcessor extends PolarisProcessor implements BeanDefini private static final Set PROPERTY_VALUES_PROCESSED_BEAN_FACTORIES = Sets.newConcurrentHashSet(); private static final Map> BEAN_DEFINITION_REGISTRY_MULTIMAP_CONCURRENT_MAP = - Maps.newConcurrentMap(); + new ConcurrentHashMap<>(); private final PolarisConfigProperties polarisConfigProperties; private final PlaceholderHelper placeholderHelper; private final SpringValueRegistry springValueRegistry; @@ -90,6 +90,33 @@ public SpringValueProcessor(PlaceholderHelper placeholderHelper, beanName2SpringValueDefinitions = LinkedListMultimap.create(); } + /** + * whether the class is primitive or wrapper. + * @param clazz the class under analysis. + * @return true if the class is primitive or wrapper, otherwise false. + */ + private static boolean isPrimitiveOrWrapper(Class clazz) { + return clazz.isPrimitive() || + clazz == String.class || + clazz == Boolean.class || + clazz == Character.class || + clazz == Byte.class || + clazz == Short.class || + clazz == Integer.class || + clazz == Long.class || + clazz == Float.class || + clazz == Double.class; + } + + /** + * whether the class is collection(array, collection, map). + * @param clazz the class under analysis. + * @return true if the class is collection(array, collection, map), otherwise false. + */ + private static boolean isCollection(Class clazz) { + return clazz.isArray() || Collection.class.isAssignableFrom(clazz) || Map.class.isAssignableFrom(clazz); + } + @Override public void postProcessBeanFactory(@NonNull ConfigurableListableBeanFactory beanFactory) throws BeansException { @@ -108,7 +135,6 @@ public Object postProcessBeforeInitialization(Object bean, @NonNull String beanN return bean; } - @Override protected void processClass(Object bean, String beanName, Class clazz, boolean isRefreshScope) { ConfigurationProperties configurationProperties = clazz.getAnnotation(ConfigurationProperties.class); @@ -178,7 +204,8 @@ private void processMethodRefreshScope(Object bean, Method method) { springValueRegistry.putRefreshScopeKeys(keys); } // method parameter class with @ConfigurationProperties - ConfigurationProperties configurationProperties = parameter.getType().getAnnotation(ConfigurationProperties.class); + ConfigurationProperties configurationProperties = parameter.getType() + .getAnnotation(ConfigurationProperties.class); parseConfigurationPropertiesKeys(configurationProperties, parameter.getType()); } @@ -192,7 +219,8 @@ private void processMethodRefreshScope(Object bean, Method method) { continue; } // field class with @ConfigurationProperties - ConfigurationProperties configurationProperties = field.getType().getAnnotation(ConfigurationProperties.class); + ConfigurationProperties configurationProperties = field.getType() + .getAnnotation(ConfigurationProperties.class); parseConfigurationPropertiesKeys(configurationProperties, field.getType()); } } @@ -250,33 +278,6 @@ else if (isCollection(field.getType())) { } } - /** - * whether the class is primitive or wrapper. - * @param clazz the class under analysis. - * @return true if the class is primitive or wrapper, otherwise false. - */ - private static boolean isPrimitiveOrWrapper(Class clazz) { - return clazz.isPrimitive() || - clazz == String.class || - clazz == Boolean.class || - clazz == Character.class || - clazz == Byte.class || - clazz == Short.class || - clazz == Integer.class || - clazz == Long.class || - clazz == Float.class || - clazz == Double.class; - } - - /** - * whether the class is collection(array, collection, map). - * @param clazz the class under analysis. - * @return true if the class is collection(array, collection, map), otherwise false. - */ - private static boolean isCollection(Class clazz) { - return clazz.isArray() || Collection.class.isAssignableFrom(clazz) || Map.class.isAssignableFrom(clazz); - } - @Override public void setBeanFactory(@NonNull BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelper.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelper.java index 77ed0629fe..6da5797bab 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelper.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelper.java @@ -17,17 +17,16 @@ package com.tencent.cloud.polaris.config.spring.property; +import java.util.HashSet; import java.util.Set; import java.util.Stack; -import com.google.common.base.Strings; -import com.google.common.collect.Sets; +import com.tencent.polaris.api.utils.StringUtils; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanExpressionContext; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.beans.factory.config.Scope; -import org.springframework.util.StringUtils; /** * Placeholder helper functions. @@ -89,7 +88,7 @@ private Object evaluateBeanDefinitionString(ConfigurableBeanFactory beanFactory, * */ public Set extractPlaceholderKeys(String propertyString) { - Set placeholderKeys = Sets.newHashSet(); + Set placeholderKeys = new HashSet<>(); if (!isPlaceholder(propertyString)) { return placeholderKeys; @@ -128,7 +127,7 @@ public Set extractPlaceholderKeys(String propertyString) { stack.push(placeholderCandidate.substring(0, separatorIndex)); String defaultValuePart = normalizeToPlaceholder(placeholderCandidate.substring(separatorIndex + VALUE_SEPARATOR.length())); - if (!Strings.isNullOrEmpty(defaultValuePart)) { + if (StringUtils.isNotBlank(defaultValuePart)) { stack.push(defaultValuePart); } } @@ -137,7 +136,7 @@ public Set extractPlaceholderKeys(String propertyString) { // has remaining part, e.g. ${a}.${b} if (endIndex + PLACEHOLDER_SUFFIX.length() < strVal.length() - 1) { String remainingPart = normalizeToPlaceholder(strVal.substring(endIndex + PLACEHOLDER_SUFFIX.length())); - if (!Strings.isNullOrEmpty(remainingPart)) { + if (StringUtils.isNotBlank(remainingPart)) { stack.push(remainingPart); } } @@ -147,7 +146,7 @@ public Set extractPlaceholderKeys(String propertyString) { } private boolean isPlaceholder(String propertyString) { - return !Strings.isNullOrEmpty(propertyString) && + return StringUtils.isNotBlank(propertyString) && (isNormalizedPlaceholder(propertyString) || isExpressionWithPlaceholder(propertyString)); } diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueRegistry.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueRegistry.java index 3ac250960f..a2f501d826 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueRegistry.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueRegistry.java @@ -21,21 +21,21 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import com.google.common.collect.LinkedListMultimap; -import com.google.common.collect.Maps; -import com.google.common.collect.Multimap; -import com.google.common.collect.Multimaps; -import com.google.common.collect.Sets; import com.tencent.polaris.api.pojo.TrieNode; import com.tencent.polaris.api.utils.TrieUtil; import com.tencent.polaris.client.util.NamedThreadFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import shade.polaris.com.google.common.collect.LinkedListMultimap; +import shade.polaris.com.google.common.collect.Multimap; +import shade.polaris.com.google.common.collect.Multimaps; +import shade.polaris.com.google.common.collect.Sets; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.DisposableBean; @@ -53,14 +53,12 @@ public class SpringValueRegistry implements DisposableBean { private static final Logger logger = LoggerFactory.getLogger(SpringValueRegistry.class); private static final long CLEAN_INTERVAL_IN_SECONDS = 5; - private final Map> registry = Maps.newConcurrentMap(); + private final Map> registry = new ConcurrentHashMap<>(); private final AtomicBoolean initialized = new AtomicBoolean(false); private final Object LOCK = new Object(); - private ScheduledExecutorService executor; - private final TrieNode refreshScopePrefixRoot = new TrieNode<>(TrieNode.ROOT_PATH); - private final Set refreshScopeKeys = Sets.newConcurrentHashSet(); + private ScheduledExecutorService executor; public void register(BeanFactory beanFactory, String key, SpringValue springValue) { if (!registry.containsKey(beanFactory)) { 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 f7afcb521b..589305f7c8 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 @@ -24,6 +24,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -52,6 +53,7 @@ public TsfConsulConfigRefreshEventListener polarisAdaptorTsfConsulRefreshEventLi */ @Bean @ConditionalOnMissingBean + @ConditionalOnWebApplication @ConditionalOnProperty(name = "tsf.config.instance.released-config.lookup.enabled", matchIfMissing = true) public PolarisAdaptorTsfConfigController polarisAdaptorTsfConfigController() { return new PolarisAdaptorTsfConfigController(); diff --git a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigFileLocatorTest.java b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigFileLocatorTest.java index 91c6dc8889..3bb1cc392b 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigFileLocatorTest.java +++ b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/adapter/PolarisConfigFileLocatorTest.java @@ -18,13 +18,13 @@ package com.tencent.cloud.polaris.config.adapter; import java.lang.reflect.Field; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; -import com.google.common.collect.Lists; import com.tencent.cloud.polaris.config.config.ConfigFileGroup; import com.tencent.cloud.polaris.config.config.PolarisConfigProperties; import com.tencent.cloud.polaris.context.config.PolarisContextProperties; @@ -179,7 +179,10 @@ public void testGetCustomFiles() { configFileGroup.setName(customGroup); String customFile1 = "file1.properties"; String customFile2 = "file2.properties"; - configFileGroup.setFiles(Lists.newArrayList(customFile1, customFile2)); + List files = new ArrayList<>(); + files.add(customFile1); + files.add(customFile2); + configFileGroup.setFiles(files); customFiles.add(configFileGroup); when(polarisConfigProperties.isEnabled()).thenReturn(true); diff --git a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/endpoint/PolarisConfigEndpointTest.java b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/endpoint/PolarisConfigEndpointTest.java index a5abe85e71..45d62a4f46 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/endpoint/PolarisConfigEndpointTest.java +++ b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/endpoint/PolarisConfigEndpointTest.java @@ -17,10 +17,10 @@ package com.tencent.cloud.polaris.config.endpoint; +import java.util.Collections; import java.util.HashMap; import java.util.Map; -import com.google.common.collect.Lists; import com.tencent.cloud.polaris.config.adapter.MockedConfigKVFile; import com.tencent.cloud.polaris.config.adapter.PolarisPropertySource; import com.tencent.cloud.polaris.config.adapter.PolarisPropertySourceManager; @@ -67,6 +67,6 @@ public void testPolarisConfigEndpoint() { PolarisConfigEndpoint endpoint = new PolarisConfigEndpoint(polarisConfigProperties); Map info = endpoint.polarisConfig(); assertThat(polarisConfigProperties).isEqualTo(info.get("PolarisConfigProperties")); - assertThat(Lists.newArrayList(polarisPropertySource)).isEqualTo(info.get("PolarisPropertySource")); + assertThat(Collections.singletonList(polarisPropertySource)).isEqualTo(info.get("PolarisPropertySource")); } } diff --git a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/listener/ConfigChangeListenerTest.java b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/listener/ConfigChangeListenerTest.java index 8a486d6e5b..78720df990 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/listener/ConfigChangeListenerTest.java +++ b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/listener/ConfigChangeListenerTest.java @@ -18,10 +18,11 @@ package com.tencent.cloud.polaris.config.listener; import java.lang.reflect.Field; +import java.util.HashSet; +import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import com.google.common.collect.Sets; import com.tencent.cloud.polaris.config.adapter.PolarisConfigFileLocator; import com.tencent.cloud.polaris.config.annotation.PolarisConfigKVFileChangeListener; import com.tencent.polaris.configuration.api.core.ConfigPropertyChangeInfo; @@ -83,8 +84,9 @@ public void test() throws InterruptedException { //submit change event System.setProperty("timeout", "2000"); - EnvironmentChangeEvent event = new EnvironmentChangeEvent(applicationContext, - Sets.newHashSet("timeout")); + Set ketSet = new HashSet<>(); + ketSet.add("timeout"); + EnvironmentChangeEvent event = new EnvironmentChangeEvent(applicationContext, ketSet); applicationEventPublisher.publishEvent(event); diff --git a/spring-cloud-starter-tencent-polaris-contract/pom.xml b/spring-cloud-starter-tencent-polaris-contract/pom.xml index 39aca10018..52e3201921 100644 --- a/spring-cloud-starter-tencent-polaris-contract/pom.xml +++ b/spring-cloud-starter-tencent-polaris-contract/pom.xml @@ -38,17 +38,27 @@ org.springdoc springdoc-openapi-ui + + + org.springframework + spring-webmvc + + + org.springframework + spring-web + + org.springdoc springdoc-openapi-webflux-ui - - - - org.springframework.boot - spring-boot-starter-test - test + + + org.springframework + spring-webflux + + diff --git a/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/PolarisContractReporter.java b/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/PolarisContractReporter.java index 66e2e01bb9..3e24086369 100644 --- a/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/PolarisContractReporter.java +++ b/spring-cloud-starter-tencent-polaris-contract/src/main/java/com/tencent/cloud/polaris/contract/PolarisContractReporter.java @@ -33,6 +33,7 @@ import com.tencent.polaris.api.plugin.server.InterfaceDescriptor; import com.tencent.polaris.api.plugin.server.ReportServiceContractRequest; import com.tencent.polaris.api.plugin.server.ReportServiceContractResponse; +import com.tencent.polaris.api.utils.CollectionUtils; import com.tencent.polaris.api.utils.StringUtils; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; @@ -49,7 +50,6 @@ import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; import org.springframework.lang.NonNull; -import org.springframework.util.CollectionUtils; /** * Polaris contract reporter. diff --git a/spring-cloud-starter-tencent-polaris-discovery/pom.xml b/spring-cloud-starter-tencent-polaris-discovery/pom.xml index 55104194e0..d282dc512e 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/pom.xml +++ b/spring-cloud-starter-tencent-polaris-discovery/pom.xml @@ -38,29 +38,11 @@ - - com.tencent.polaris - polaris-test-common - test - - com.tencent.polaris connector-nacos test - - - com.tencent.polaris - polaris-test-mock-discovery - test - - - junit - junit - - - @@ -98,12 +80,6 @@ true - - org.springframework.boot - spring-boot-starter-test - test - - org.springframework.boot spring-boot-actuator @@ -115,22 +91,5 @@ spring-boot-actuator-autoconfigure true - - - joda-time - joda-time - - - - org.mockito - mockito-inline - test - - - - io.projectreactor - reactor-test - test - diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryAutoConfiguration.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryAutoConfiguration.java index 78129c4bcb..0382830424 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryAutoConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisDiscoveryAutoConfiguration.java @@ -17,16 +17,13 @@ package com.tencent.cloud.polaris.discovery; -import com.tencent.cloud.polaris.PolarisDiscoveryProperties; import com.tencent.cloud.polaris.discovery.reactive.PolarisReactiveDiscoveryClientConfiguration; import com.tencent.cloud.polaris.discovery.refresh.PolarisRefreshConfiguration; -import com.tencent.cloud.polaris.extend.nacos.NacosContextProperties; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.lang.Nullable; /** * Discovery Auto Configuration for Polaris. @@ -41,13 +38,7 @@ public class PolarisDiscoveryAutoConfiguration { @Bean @ConditionalOnMissingBean - public PolarisServiceDiscovery polarisServiceDiscovery( - @Nullable NacosContextProperties nacosContextProperties, - PolarisDiscoveryProperties polarisDiscoveryProperties, - PolarisDiscoveryHandler polarisDiscoveryHandler) { - return new PolarisServiceDiscovery( - nacosContextProperties, - polarisDiscoveryProperties, - polarisDiscoveryHandler); + public PolarisServiceDiscovery polarisServiceDiscovery(PolarisDiscoveryHandler polarisDiscoveryHandler) { + return new PolarisServiceDiscovery(polarisDiscoveryHandler); } } diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisServiceDiscovery.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisServiceDiscovery.java index a99f99fb66..bb97791ca1 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisServiceDiscovery.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/PolarisServiceDiscovery.java @@ -24,8 +24,6 @@ import com.tencent.cloud.common.pojo.PolarisServiceInstance; import com.tencent.cloud.common.util.DiscoveryUtil; -import com.tencent.cloud.polaris.PolarisDiscoveryProperties; -import com.tencent.cloud.polaris.extend.nacos.NacosContextProperties; import com.tencent.polaris.api.exception.PolarisException; import com.tencent.polaris.api.pojo.Instance; import com.tencent.polaris.api.pojo.ServiceInfo; @@ -42,18 +40,9 @@ */ public class PolarisServiceDiscovery { - private final NacosContextProperties nacosContextProperties; - - private final PolarisDiscoveryProperties polarisDiscoveryProperties; - private final PolarisDiscoveryHandler polarisDiscoveryHandler; - public PolarisServiceDiscovery( - NacosContextProperties nacosContextProperties, - PolarisDiscoveryProperties polarisDiscoveryProperties, - PolarisDiscoveryHandler polarisDiscoveryHandler) { - this.nacosContextProperties = nacosContextProperties; - this.polarisDiscoveryProperties = polarisDiscoveryProperties; + public PolarisServiceDiscovery(PolarisDiscoveryHandler polarisDiscoveryHandler) { this.polarisDiscoveryHandler = polarisDiscoveryHandler; } diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/refresh/PolarisServiceStatusChangeListener.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/refresh/PolarisServiceStatusChangeListener.java index bf4a829db5..e1fc9529bf 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/refresh/PolarisServiceStatusChangeListener.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/discovery/refresh/PolarisServiceStatusChangeListener.java @@ -23,7 +23,6 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; -import com.google.common.collect.Sets; import com.tencent.polaris.api.plugin.registry.AbstractResourceEventListener; import com.tencent.polaris.api.pojo.Instance; import com.tencent.polaris.api.pojo.RegistryCacheValue; @@ -33,6 +32,7 @@ import com.tencent.polaris.client.pojo.ServicesByProto; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import shade.polaris.com.google.common.collect.Sets; import org.springframework.cloud.client.discovery.event.HeartbeatEvent; import org.springframework.context.ApplicationEventPublisher; diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/endpoint/PolarisDiscoveryEndpoint.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/endpoint/PolarisDiscoveryEndpoint.java index 8d260ed5dc..a5058161f5 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/endpoint/PolarisDiscoveryEndpoint.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/endpoint/PolarisDiscoveryEndpoint.java @@ -26,7 +26,7 @@ import com.tencent.cloud.polaris.discovery.PolarisDiscoveryHandler; import com.tencent.polaris.api.pojo.ServiceInstances; import com.tencent.polaris.api.rpc.InstancesResponse; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.springframework.boot.actuate.endpoint.annotation.Endpoint; import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulDiscoveryConfigModifier.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulDiscoveryConfigModifier.java index 5dcfb32b0a..a912db65bb 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulDiscoveryConfigModifier.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulDiscoveryConfigModifier.java @@ -145,8 +145,8 @@ public void modify(ConfigurationImpl configuration) { configuration.getProvider().getRegisters().add(registerConfig); // heartbeat - polarisDiscoveryProperties.setHeartbeatInterval(Long.valueOf( - consulHeartbeatProperties.computeHeartbeatInterval().toStandardDuration().getMillis()).intValue()); + polarisDiscoveryProperties.setHeartbeatInterval( + (int) consulHeartbeatProperties.computeHeartbeatInterval().getSeconds()); } @Override diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulDiscoveryUtil.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulDiscoveryUtil.java index dd3f187bc7..a1dcb2c7db 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulDiscoveryUtil.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulDiscoveryUtil.java @@ -116,7 +116,7 @@ public static void setCheck(AutoServiceRegistrationProperties autoServiceRegistr Assert.notNull(checkPort, "checkPort may not be null"); for (ServerConnectorConfigImpl config : configuration.getGlobal().getServerConnectors()) { - if (org.apache.commons.lang.StringUtils.equals(config.getId(), ID)) { + if (StringUtils.equals(config.getId(), ID)) { Map metadata = config.getMetadata(); NewService.Check check = createCheck(checkPort, consulHeartbeatProperties, properties, tsfCoreProperties); String checkJson = JacksonUtils.serialize2Json(check); diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulHeartbeatProperties.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulHeartbeatProperties.java index 23df9aadf1..6e35a25832 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulHeartbeatProperties.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/consul/ConsulHeartbeatProperties.java @@ -17,18 +17,14 @@ package com.tencent.cloud.polaris.extend.consul; -import javax.validation.constraints.DecimalMax; -import javax.validation.constraints.DecimalMin; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotNull; +import java.time.Duration; -import org.joda.time.Period; +import com.tencent.polaris.api.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.core.style.ToStringCreator; -import org.springframework.validation.annotation.Validated; /** * Copy from org.springframework.cloud.consul.discovery.HeartbeatProperties. @@ -38,7 +34,6 @@ * @author Chris Bono */ @ConfigurationProperties(prefix = "spring.cloud.consul.discovery.heartbeat") -@Validated public class ConsulHeartbeatProperties { private static final Logger LOGGER = LoggerFactory.getLogger(ConsulHeartbeatProperties.class); @@ -46,26 +41,22 @@ public class ConsulHeartbeatProperties { // [WARN] agent: Check 'service:testConsulApp:xtest:8080' missed TTL, is now critical boolean enabled = true; - @Min(1) private int ttlValue = 30; - @NotNull private String ttlUnit = "s"; - @DecimalMin("0.1") - @DecimalMax("0.9") private double intervalRatio = 2.0 / 3.0; //TODO: did heartbeatInterval need to be a field? - protected Period computeHeartbeatInterval() { + protected Duration computeHeartbeatInterval() { // heartbeat rate at ratio * ttl, but no later than ttl -1s and, (under lesser // priority), no sooner than 1s from now double interval = ttlValue * intervalRatio; double max = Math.max(interval, 1); int ttlMinus1 = ttlValue - 1; double min = Math.min(ttlMinus1, max); - Period heartbeatInterval = new Period(Math.round(1000 * min)); + Duration heartbeatInterval = Duration.ofMillis(Math.round(1000 * min)); LOGGER.debug("Computed heartbeatInterval: " + heartbeatInterval); return heartbeatInterval; } @@ -82,27 +73,39 @@ public void setEnabled(boolean enabled) { this.enabled = enabled; } - public @Min(1) int getTtlValue() { + public int getTtlValue() { return this.ttlValue; } - public void setTtlValue(@Min(1) int ttlValue) { + public void setTtlValue(int ttlValue) { + if (ttlValue < 1) { + LOGGER.error("ttlValue must be at least 1, invalid value: {}", ttlValue); + throw new IllegalArgumentException("ttlValue must be at least 1"); + } this.ttlValue = ttlValue; } - public @NotNull String getTtlUnit() { + public String getTtlUnit() { return this.ttlUnit; } - public void setTtlUnit(@NotNull String ttlUnit) { + public void setTtlUnit(String ttlUnit) { + if (StringUtils.isEmpty(ttlUnit)) { + LOGGER.error("ttlUnit cannot be null or empty"); + throw new IllegalArgumentException("ttlUnit cannot be null or empty"); + } this.ttlUnit = ttlUnit; } - public @DecimalMin("0.1") @DecimalMax("0.9") double getIntervalRatio() { + public double getIntervalRatio() { return this.intervalRatio; } - public void setIntervalRatio(@DecimalMin("0.1") @DecimalMax("0.9") double intervalRatio) { + public void setIntervalRatio(double intervalRatio) { + if (intervalRatio < 0.1 || intervalRatio > 0.9) { + LOGGER.error("intervalRatio must be between 0.1 and 0.9, invalid value: {}", intervalRatio); + throw new IllegalArgumentException("intervalRatio must be between 0.1 and 0.9"); + } this.intervalRatio = intervalRatio; } diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/nacos/NacosConfigModifier.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/nacos/NacosConfigModifier.java index 21b2263219..a02b00126c 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/nacos/NacosConfigModifier.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/extend/nacos/NacosConfigModifier.java @@ -25,15 +25,15 @@ import com.tencent.cloud.common.constant.OrderConstant; import com.tencent.cloud.polaris.context.PolarisConfigModifier; import com.tencent.polaris.api.config.plugin.DefaultPlugins; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.factory.config.ConfigurationImpl; import com.tencent.polaris.factory.config.consumer.DiscoveryConfigImpl; import com.tencent.polaris.factory.config.global.ServerConnectorConfigImpl; import com.tencent.polaris.factory.config.provider.RegisterConfigImpl; -import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; /** * {@link PolarisConfigModifier} impl of Nacos. diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisRegistration.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisRegistration.java index f8b93b9b1e..1738f2d69c 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisRegistration.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisRegistration.java @@ -28,15 +28,15 @@ import com.tencent.cloud.polaris.context.config.PolarisContextProperties; import com.tencent.cloud.polaris.extend.consul.ConsulDiscoveryProperties; import com.tencent.cloud.polaris.extend.nacos.NacosContextProperties; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.client.api.SDKContext; -import org.apache.commons.lang.StringUtils; import org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext; import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext; import org.springframework.cloud.client.DefaultServiceInstance; import org.springframework.cloud.client.serviceregistry.Registration; import org.springframework.lang.Nullable; -import org.springframework.util.CollectionUtils; import static com.tencent.cloud.polaris.extend.nacos.NacosContextProperties.DEFAULT_CLUSTER; import static com.tencent.cloud.polaris.extend.nacos.NacosContextProperties.DEFAULT_GROUP; diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisServiceRegistry.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisServiceRegistry.java index 71de4be33b..c6816a0f58 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisServiceRegistry.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisServiceRegistry.java @@ -43,12 +43,12 @@ import com.tencent.polaris.api.rpc.InstanceRegisterRequest; import com.tencent.polaris.api.rpc.InstanceRegisterResponse; import com.tencent.polaris.api.rpc.InstancesResponse; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.client.util.NamedThreadFactory; import com.tencent.polaris.factory.config.provider.ServiceConfigImpl; import com.tencent.polaris.metadata.core.TransitiveType; import com.tencent.polaris.metadata.core.constant.MetadataConstants; import com.tencent.polaris.metadata.core.manager.CalleeMetadataContainerGroup; -import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/tsf/TsfServletRegistrationCustomizer.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/tsf/TsfServletRegistrationCustomizer.java index 7296e52c50..5651d7db88 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/tsf/TsfServletRegistrationCustomizer.java +++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/tsf/TsfServletRegistrationCustomizer.java @@ -17,17 +17,13 @@ package com.tencent.cloud.polaris.registry.tsf; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; +import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; -import com.tencent.cloud.common.util.JacksonUtils; import com.tencent.cloud.polaris.registry.PolarisRegistration; import com.tencent.cloud.polaris.registry.PolarisRegistrationCustomizer; -import com.tencent.polaris.plugins.connector.common.constant.ConsulConstant; import org.springframework.beans.factory.ObjectProvider; import org.springframework.util.StringUtils; @@ -53,14 +49,11 @@ public void customize(PolarisRegistration registration) { if (sc != null && StringUtils.hasText(sc.getContextPath()) && StringUtils.hasText(sc.getContextPath().replaceAll("/", ""))) { - Map metadata = registration.getMetadata(); + Map metadata = registration.getExtendedMetadata() + .computeIfAbsent(TAGS_KEY, k -> new HashMap<>()); - List tags = Arrays.asList(JacksonUtils.deserialize(metadata.get(TAGS_KEY), String[].class)); - if (tags == null) { - tags = new ArrayList<>(); - } - tags.add("contextPath=" + sc.getContextPath()); - metadata.put(ConsulConstant.MetadataMapKey.TAGS_KEY, JacksonUtils.serialize2Json(tags)); + String value = "contextPath=" + sc.getContextPath(); + metadata.put(value, value); } } } diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/extend/consul/ConsulHeartbeatPropertiesTest.java b/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/extend/consul/ConsulHeartbeatPropertiesTest.java new file mode 100644 index 0000000000..4290552b91 --- /dev/null +++ b/spring-cloud-starter-tencent-polaris-discovery/src/test/java/com/tencent/cloud/polaris/extend/consul/ConsulHeartbeatPropertiesTest.java @@ -0,0 +1,108 @@ +/* + * Tencent is pleased to support the open source community by making spring-cloud-tencent available. + * + * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * + * Licensed under the BSD 3-Clause License (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://opensource.org/licenses/BSD-3-Clause + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.tencent.cloud.polaris.extend.consul; + +import com.tencent.cloud.common.util.inet.PolarisInetUtilsAutoConfiguration; +import com.tencent.cloud.polaris.DiscoveryPropertiesAutoConfiguration; +import com.tencent.cloud.polaris.context.config.PolarisContextAutoConfiguration; +import org.junit.jupiter.api.Test; + +import org.springframework.boot.autoconfigure.AutoConfigurations; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Test for {@link ConsulHeartbeatProperties}. + * + * @author Haotian Zhang + */ +public class ConsulHeartbeatPropertiesTest { + + @Test + public void testGettersAndSetters() { + ApplicationContextRunner applicationContextRunner = new ApplicationContextRunner() + .withConfiguration(AutoConfigurations.of(PolarisContextAutoConfiguration.class, + PolarisInetUtilsAutoConfiguration.class, DiscoveryPropertiesAutoConfiguration.class)) + .withPropertyValues("spring.cloud.consul.enabled=true") + .withPropertyValues("spring.cloud.consul.discovery.heartbeat.ttlValue=60") + .withPropertyValues("spring.cloud.consul.discovery.heartbeat.ttl-unit=m") + .withPropertyValues("spring.cloud.consul.discovery.heartbeat.interval-ratio=0.5"); + applicationContextRunner.run(context -> { + assertThat(context).hasSingleBean(ConsulHeartbeatProperties.class); + ConsulHeartbeatProperties heartbeatProperties = context.getBean(ConsulHeartbeatProperties.class); + assertThat(heartbeatProperties.isEnabled()).isTrue(); + assertThat(heartbeatProperties.getTtlValue()).isEqualTo(60); + assertThat(heartbeatProperties.getTtlUnit()).isEqualTo("m"); + assertThat(heartbeatProperties.getIntervalRatio()).isEqualTo(0.5); + }); + } + + @Test + public void testTtlValueWrong() { + ApplicationContextRunner applicationContextRunner = new ApplicationContextRunner() + .withConfiguration(AutoConfigurations.of(PolarisInetUtilsAutoConfiguration.class, DiscoveryPropertiesAutoConfiguration.class)) + .withPropertyValues("spring.cloud.consul.enabled=true") + .withPropertyValues("spring.cloud.consul.discovery.heartbeat.ttlValue=0"); + applicationContextRunner.run(context -> { + assertThat(context).hasFailed(); + assertThat(context.getStartupFailure()) + .hasRootCauseExactlyInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage("ttlValue must be at least 1"); + }); + } + + @Test + public void testTtlUnitWrong() { + ApplicationContextRunner applicationContextRunner = new ApplicationContextRunner() + .withConfiguration(AutoConfigurations.of(PolarisInetUtilsAutoConfiguration.class, DiscoveryPropertiesAutoConfiguration.class)) + .withPropertyValues("spring.cloud.consul.enabled=true") + .withPropertyValues("spring.cloud.consul.discovery.heartbeat.ttl-unit="); + applicationContextRunner.run(context -> { + assertThat(context).hasFailed(); + assertThat(context.getStartupFailure()) + .hasRootCauseExactlyInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage("ttlUnit cannot be null or empty"); + }); + } + + @Test + public void testIntervalRatioWrong() { + ApplicationContextRunner applicationContextRunner1 = new ApplicationContextRunner() + .withConfiguration(AutoConfigurations.of(PolarisInetUtilsAutoConfiguration.class, DiscoveryPropertiesAutoConfiguration.class)) + .withPropertyValues("spring.cloud.consul.enabled=true") + .withPropertyValues("spring.cloud.consul.discovery.heartbeat.interval-ratio=0"); + applicationContextRunner1.run(context -> { + assertThat(context).hasFailed(); + assertThat(context.getStartupFailure()) + .hasRootCauseExactlyInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage("intervalRatio must be between 0.1 and 0.9"); + }); + + ApplicationContextRunner applicationContextRunner2 = new ApplicationContextRunner() + .withConfiguration(AutoConfigurations.of(PolarisInetUtilsAutoConfiguration.class, DiscoveryPropertiesAutoConfiguration.class)) + .withPropertyValues("spring.cloud.consul.enabled=true") + .withPropertyValues("spring.cloud.consul.discovery.heartbeat.interval-ratio=1"); + applicationContextRunner2.run(context -> { + assertThat(context).hasFailed(); + assertThat(context.getStartupFailure()) + .hasRootCauseExactlyInstanceOf(IllegalArgumentException.class) + .hasRootCauseMessage("intervalRatio must be between 0.1 and 0.9"); + }); + } +} diff --git a/spring-cloud-starter-tencent-polaris-ratelimit/pom.xml b/spring-cloud-starter-tencent-polaris-ratelimit/pom.xml index 642ef93227..4dcec329fa 100644 --- a/spring-cloud-starter-tencent-polaris-ratelimit/pom.xml +++ b/spring-cloud-starter-tencent-polaris-ratelimit/pom.xml @@ -14,73 +14,12 @@ Spring Cloud Starter Tencent Polaris Ratelimit - - - com.tencent.cloud - spring-cloud-tencent-rpc-enhancement - - com.tencent.cloud spring-cloud-starter-tencent-metadata-transfer - - - com.tencent.polaris - polaris-ratelimit-factory - - - com.tencent.polaris - router-rule - - - com.tencent.polaris - router-nearby - - - com.tencent.polaris - router-namespace - - - com.tencent.polaris - router-canary - - - com.tencent.polaris - router-set - - - com.tencent.polaris - router-isolated - - - com.tencent.polaris - router-healthy - - - - - - com.tencent.polaris - polaris-test-common - test - - - - com.tencent.polaris - polaris-test-mock-discovery - test - - - junit - junit - - - - - org.springframework.boot spring-boot-starter-web @@ -105,34 +44,10 @@ true - - org.springframework.boot - spring-boot-starter-test - test - - org.springframework.cloud spring-cloud-starter-netflix-ribbon test - - - org.mockito - mockito-inline - test - - - - org.mockito - mockito-core - test - - - - net.bytebuddy - byte-buddy - test - diff --git a/spring-cloud-starter-tencent-polaris-ratelimit/src/main/java/com/tencent/cloud/polaris/ratelimit/endpoint/PolarisRateLimitRuleEndpoint.java b/spring-cloud-starter-tencent-polaris-ratelimit/src/main/java/com/tencent/cloud/polaris/ratelimit/endpoint/PolarisRateLimitRuleEndpoint.java index 4c0c904e56..721b5fc368 100644 --- a/spring-cloud-starter-tencent-polaris-ratelimit/src/main/java/com/tencent/cloud/polaris/ratelimit/endpoint/PolarisRateLimitRuleEndpoint.java +++ b/spring-cloud-starter-tencent-polaris-ratelimit/src/main/java/com/tencent/cloud/polaris/ratelimit/endpoint/PolarisRateLimitRuleEndpoint.java @@ -22,8 +22,6 @@ import java.util.List; import java.util.Map; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.util.JsonFormat; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.common.util.JacksonUtils; import com.tencent.cloud.polaris.context.ServiceRuleManager; @@ -31,6 +29,8 @@ import com.tencent.polaris.specification.api.v1.traffic.manage.RateLimitProto; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import shade.polaris.com.google.protobuf.InvalidProtocolBufferException; +import shade.polaris.com.google.protobuf.util.JsonFormat; import org.springframework.boot.actuate.endpoint.annotation.Endpoint; import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; diff --git a/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/context/CalleeControllerTests.java b/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/context/CalleeControllerTests.java index 29032c59fb..262b9c3e25 100644 --- a/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/context/CalleeControllerTests.java +++ b/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/context/CalleeControllerTests.java @@ -17,7 +17,6 @@ package com.tencent.cloud.polaris.context; -import com.google.protobuf.StringValue; import com.tencent.cloud.polaris.ratelimit.config.PolarisRateLimitProperties; import com.tencent.cloud.polaris.ratelimit.filter.QuotaCheckServletFilter; import com.tencent.cloud.polaris.ratelimit.spi.PolarisRateLimiterLimitedFallback; @@ -34,6 +33,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import shade.polaris.com.google.protobuf.StringValue; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; diff --git a/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/endpoint/PolarisRateLimitRuleEndpointTests.java b/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/endpoint/PolarisRateLimitRuleEndpointTests.java index dded4fc1d6..0738a56a21 100644 --- a/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/endpoint/PolarisRateLimitRuleEndpointTests.java +++ b/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/endpoint/PolarisRateLimitRuleEndpointTests.java @@ -19,7 +19,6 @@ import java.util.Map; -import com.google.protobuf.StringValue; import com.tencent.cloud.polaris.context.ServiceRuleManager; import com.tencent.cloud.polaris.ratelimit.config.PolarisRateLimitProperties; import com.tencent.polaris.specification.api.v1.model.ModelProto; @@ -28,6 +27,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; +import shade.polaris.com.google.protobuf.StringValue; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; diff --git a/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/filter/QuotaCheckReactiveFilterTest.java b/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/filter/QuotaCheckReactiveFilterTest.java index 6e9fa39aa8..cb2e54cc22 100644 --- a/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/filter/QuotaCheckReactiveFilterTest.java +++ b/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/filter/QuotaCheckReactiveFilterTest.java @@ -22,14 +22,9 @@ import java.io.InputStreamReader; import java.lang.reflect.Field; import java.nio.charset.StandardCharsets; -import java.util.Collections; import java.util.concurrent.CountDownLatch; import java.util.stream.Collectors; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.StringValue; -import com.google.protobuf.util.JsonFormat; -import com.tencent.cloud.common.constant.HeaderConstant; import com.tencent.cloud.common.constant.OrderConstant; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.polaris.context.ServiceRuleManager; @@ -47,6 +42,8 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; import reactor.core.publisher.Mono; +import shade.polaris.com.google.protobuf.InvalidProtocolBufferException; +import shade.polaris.com.google.protobuf.util.JsonFormat; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; @@ -93,8 +90,7 @@ else if (serviceName.equals("TestApp2")) { } else if (serviceName.equals("TestApp3")) { QuotaResponse response = new QuotaResponse(new QuotaResult(QuotaResult.Code.QuotaResultLimited, 0, "QuotaResultLimited")); - response.setActiveRule(RateLimitProto.Rule.newBuilder() - .setName(StringValue.newBuilder().setValue("MOCK_RULE").build()).build()); + response.setActiveRule(RateLimitProto.Rule.newBuilder().build()); return response; } else { @@ -184,8 +180,6 @@ public void testFilter() { ServerHttpResponse response = testApp3Exchange.getResponse(); assertThat(response.getRawStatusCode()).isEqualTo(419); assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE); - assertThat(response.getHeaders() - .get(HeaderConstant.INTERNAL_ACTIVE_RULE_NAME)).isEqualTo(Collections.singletonList("MOCK_RULE")); // Exception MetadataContext.LOCAL_SERVICE = "TestApp4"; diff --git a/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/filter/QuotaCheckServletFilterTest.java b/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/filter/QuotaCheckServletFilterTest.java index 0a42cc3106..df6cf00b0e 100644 --- a/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/filter/QuotaCheckServletFilterTest.java +++ b/spring-cloud-starter-tencent-polaris-ratelimit/src/test/java/com/tencent/cloud/polaris/ratelimit/filter/QuotaCheckServletFilterTest.java @@ -28,9 +28,6 @@ import javax.servlet.FilterChain; import javax.servlet.ServletException; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.StringValue; -import com.google.protobuf.util.JsonFormat; import com.tencent.cloud.common.constant.HeaderConstant; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.polaris.context.ServiceRuleManager; @@ -44,6 +41,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import shade.polaris.com.google.protobuf.InvalidProtocolBufferException; +import shade.polaris.com.google.protobuf.StringValue; +import shade.polaris.com.google.protobuf.util.JsonFormat; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; diff --git a/spring-cloud-starter-tencent-polaris-router/pom.xml b/spring-cloud-starter-tencent-polaris-router/pom.xml index 3975201b49..8d108d6c1d 100644 --- a/spring-cloud-starter-tencent-polaris-router/pom.xml +++ b/spring-cloud-starter-tencent-polaris-router/pom.xml @@ -15,45 +15,12 @@ - - com.tencent.cloud - spring-cloud-tencent-polaris-loadbalancer - - - com.tencent.cloud - spring-cloud-tencent-rpc-enhancement - com.tencent.cloud spring-cloud-starter-tencent-metadata-transfer - - - com.tencent.polaris - router-rule - - - junit - junit - - - - - com.tencent.polaris - router-metadata - - - com.tencent.polaris - router-nearby - - - com.tencent.polaris - router-namespace - - - org.springframework.cloud spring-cloud-starter-openfeign @@ -73,8 +40,8 @@ - org.springframework.retry - spring-retry + org.springframework.boot + spring-boot-starter-webflux true @@ -97,39 +64,26 @@ - org.springframework.boot - spring-boot-actuator-autoconfigure - true - - - - org.springframework.boot - spring-boot-starter-test - test - - - - org.mockito - mockito-inline + com.squareup.okhttp3 + okhttp test - org.mockito - mockito-core - test + org.springframework.boot + spring-boot-actuator-autoconfigure + true - com.squareup.okhttp3 - okhttp - test + com.tencent.cloud + spring-cloud-tencent-polaris-loadbalancer - net.bytebuddy - byte-buddy - test + org.springframework.retry + spring-retry + true diff --git a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/PolarisRouterContext.java b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/PolarisRouterContext.java index 45cbe9f443..2463f93466 100644 --- a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/PolarisRouterContext.java +++ b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/PolarisRouterContext.java @@ -23,9 +23,9 @@ import java.util.Set; import com.tencent.cloud.common.constant.RouterConstant; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; -import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedCaseInsensitiveMap; /** diff --git a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/RouterConfigModifier.java b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/RouterConfigModifier.java index 6ff60d98d1..38de4a7a39 100644 --- a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/RouterConfigModifier.java +++ b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/RouterConfigModifier.java @@ -21,11 +21,11 @@ import com.tencent.cloud.polaris.context.PolarisConfigModifier; import com.tencent.cloud.polaris.router.config.properties.PolarisNearByRouterProperties; import com.tencent.polaris.api.config.consumer.ServiceRouterConfig; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.factory.config.ConfigurationImpl; import com.tencent.polaris.plugins.router.healthy.RecoverRouterConfig; import com.tencent.polaris.plugins.router.nearby.NearbyRouterConfig; import com.tencent.polaris.specification.api.v1.traffic.manage.RoutingProto; -import org.apache.commons.lang.StringUtils; /** * RouterConfigModifier. diff --git a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/config/RouterAutoConfiguration.java b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/config/RouterAutoConfiguration.java index 588a8b6426..d3328faa08 100644 --- a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/config/RouterAutoConfiguration.java +++ b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/config/RouterAutoConfiguration.java @@ -105,7 +105,7 @@ public RuleBasedRouterRequestInterceptor ruleBasedRouterRequestInterceptor(Polar } @Bean - @ConditionalOnProperty(value = "spring.cloud.polaris.router.namespace-router.enabled", matchIfMissing = true) + @ConditionalOnProperty("spring.cloud.polaris.router.namespace-router.enabled") public NamespaceRouterRequestInterceptor namespaceRouterRequestInterceptor(PolarisNamespaceRouterProperties polarisNamespaceRouterProperties) { return new NamespaceRouterRequestInterceptor(polarisNamespaceRouterProperties); } diff --git a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/endpoint/PolarisRouterEndpoint.java b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/endpoint/PolarisRouterEndpoint.java index 27791da0db..4319ad8b6e 100644 --- a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/endpoint/PolarisRouterEndpoint.java +++ b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/endpoint/PolarisRouterEndpoint.java @@ -22,15 +22,15 @@ import java.util.List; import java.util.Map; -import com.google.protobuf.InvalidProtocolBufferException; -import com.google.protobuf.MessageOrBuilder; -import com.google.protobuf.util.JsonFormat; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.cloud.common.util.JacksonUtils; import com.tencent.cloud.polaris.context.ServiceRuleManager; import com.tencent.polaris.specification.api.v1.traffic.manage.RoutingProto; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import shade.polaris.com.google.protobuf.InvalidProtocolBufferException; +import shade.polaris.com.google.protobuf.MessageOrBuilder; +import shade.polaris.com.google.protobuf.util.JsonFormat; import org.springframework.boot.actuate.endpoint.annotation.Endpoint; import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; diff --git a/spring-cloud-starter-tencent-polaris-router/src/test/java/com/tencent/cloud/polaris/router/PolarisRouterContextTest.java b/spring-cloud-starter-tencent-polaris-router/src/test/java/com/tencent/cloud/polaris/router/PolarisRouterContextTest.java index 24db3aca0d..e9ef3e0115 100644 --- a/spring-cloud-starter-tencent-polaris-router/src/test/java/com/tencent/cloud/polaris/router/PolarisRouterContextTest.java +++ b/spring-cloud-starter-tencent-polaris-router/src/test/java/com/tencent/cloud/polaris/router/PolarisRouterContextTest.java @@ -18,9 +18,10 @@ package com.tencent.cloud.polaris.router; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; +import java.util.Set; -import com.google.common.collect.Sets; import com.tencent.cloud.common.constant.RouterConstant; import org.junit.jupiter.api.Test; @@ -74,8 +75,11 @@ public void testGetLabelByKeys() { PolarisRouterContext routerContext = new PolarisRouterContext(); routerContext.putLabels(RouterConstant.ROUTER_LABELS, labels); - Map resolvedLabels = routerContext.getLabels(RouterConstant.ROUTER_LABELS, - Sets.newHashSet("k1", "k2", "k4")); + Set labelKeySet = new HashSet<>(); + labelKeySet.add("k1"); + labelKeySet.add("k2"); + labelKeySet.add("k4"); + Map resolvedLabels = routerContext.getLabels(RouterConstant.ROUTER_LABELS, labelKeySet); assertThat(resolvedLabels.size()).isEqualTo(2); assertThat(resolvedLabels.get("k1")).isEqualTo("v1"); diff --git a/spring-cloud-tencent-commons/pom.xml b/spring-cloud-tencent-commons/pom.xml index fce985ddeb..853a2ffceb 100644 --- a/spring-cloud-tencent-commons/pom.xml +++ b/spring-cloud-tencent-commons/pom.xml @@ -22,11 +22,7 @@ com.tencent.polaris - polaris-model - - - com.tencent.polaris - polaris-metadata + polaris-all @@ -36,35 +32,29 @@ - org.springframework.boot - spring-boot-autoconfigure - - - - org.springframework.boot - spring-boot-configuration-processor - - - - org.springframework.boot - spring-boot-starter-json + org.springframework.cloud + spring-cloud-context + + + spring-security-crypto + org.springframework.security + + org.springframework.cloud - spring-cloud-starter + spring-cloud-commons - commons-lang - commons-lang - ${commons.lang.version} + org.springframework.boot + spring-boot-autoconfigure - commons-io - commons-io - ${commons.io.version} + org.springframework.boot + spring-boot-configuration-processor @@ -79,11 +69,6 @@ true - - com.google.code.gson - gson - - org.springframework.cloud spring-cloud-starter-openfeign @@ -102,35 +87,11 @@ true - - org.springframework.boot - spring-boot-starter-test - test - - - - org.springframework.boot - spring-boot-actuator - true - - org.springframework.boot spring-boot-actuator-autoconfigure true - - - com.tencent.polaris - polaris-test-common - test - - - - uk.org.webcompere - system-stubs-jupiter - test - diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/MetadataContextHolder.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/MetadataContextHolder.java index 55473bfd88..dd5e240acd 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/MetadataContextHolder.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/MetadataContextHolder.java @@ -23,6 +23,8 @@ import java.util.Optional; import com.tencent.cloud.common.util.ApplicationContextAwareUtils; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.metadata.core.MessageMetadataContainer; import com.tencent.polaris.metadata.core.MetadataContainer; import com.tencent.polaris.metadata.core.MetadataProvider; @@ -31,9 +33,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; - import static com.tencent.cloud.common.metadata.MetadataContext.FRAGMENT_DISPOSABLE; import static com.tencent.cloud.common.metadata.MetadataContext.FRAGMENT_UPSTREAM_DISPOSABLE; @@ -88,7 +87,7 @@ private static MetadataContext createMetadataManager() { metadataContainer.putMetadataStringValue(entry.getKey(), entry.getValue(), TransitiveType.DISPOSABLE); } // local trans header - if (StringUtils.hasText(staticMetadataManager.getTransHeader())) { + if (StringUtils.isNotBlank(staticMetadataManager.getTransHeader())) { String transHeader = staticMetadataManager.getTransHeader(); metadataContainer.putMetadataMapValue(MetadataContext.FRAGMENT_RAW_TRANSHEADERS, transHeader, "", TransitiveType.NONE); } @@ -159,14 +158,14 @@ public static void init(Map dynamicTransitiveMetadata, Map { // caller transitive metadata to local custom transitive metadata MetadataContainer calleeCustomMetadataContainer = metadataManager.getMetadataContainer(MetadataType.CUSTOM, false); - if (!CollectionUtils.isEmpty(dynamicTransitiveMetadata)) { + if (CollectionUtils.isNotEmpty(dynamicTransitiveMetadata)) { for (Map.Entry entry : dynamicTransitiveMetadata.entrySet()) { calleeCustomMetadataContainer.putMetadataStringValue(entry.getKey(), entry.getValue(), TransitiveType.PASS_THROUGH); } } // caller disposable metadata to caller custom disposable metadata MetadataContainer callerCustomMetadataContainer = metadataManager.getMetadataContainer(MetadataType.CUSTOM, true); - if (!CollectionUtils.isEmpty(dynamicDisposableMetadata)) { + if (CollectionUtils.isNotEmpty(dynamicDisposableMetadata)) { for (Map.Entry entry : dynamicDisposableMetadata.entrySet()) { calleeCustomMetadataContainer.putMetadataStringValue(entry.getKey(), entry.getValue(), TransitiveType.NONE); callerCustomMetadataContainer.putMetadataStringValue(entry.getKey(), entry.getValue(), TransitiveType.DISPOSABLE); @@ -174,7 +173,7 @@ public static void init(Map dynamicTransitiveMetadata, Map entry : dynamicApplicationMetadata.entrySet()) { callerApplicationMetadataContainer.putMetadataStringValue(entry.getKey(), entry.getValue(), TransitiveType.DISPOSABLE); } diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/StaticMetadataManager.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/StaticMetadataManager.java index 7ba43dddf1..03d1f0371c 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/StaticMetadataManager.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/StaticMetadataManager.java @@ -29,12 +29,11 @@ import com.tencent.cloud.common.metadata.config.MetadataLocalProperties; import com.tencent.cloud.common.spi.InstanceMetadataProvider; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; - /** * manage metadata from env/config file/custom spi. * diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/pojo/PolarisServer.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/pojo/PolarisServer.java index 623efe5aeb..f726f330e6 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/pojo/PolarisServer.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/pojo/PolarisServer.java @@ -23,7 +23,8 @@ import com.netflix.loadbalancer.Server; import com.tencent.polaris.api.pojo.Instance; import com.tencent.polaris.api.pojo.ServiceInstances; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; + /** * Polaris' implementation of {@link Server}. diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/pojo/PolarisServiceInstance.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/pojo/PolarisServiceInstance.java index 760a3f3b73..4c2248263f 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/pojo/PolarisServiceInstance.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/pojo/PolarisServiceInstance.java @@ -24,7 +24,7 @@ import com.tencent.polaris.api.pojo.Instance; import com.tencent.polaris.api.utils.CollectionUtils; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.springframework.cloud.client.DefaultServiceInstance; import org.springframework.cloud.client.ServiceInstance; diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/rule/Operation.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/rule/Operation.java index bb70728700..47598850af 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/rule/Operation.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/rule/Operation.java @@ -20,9 +20,9 @@ import java.util.List; import java.util.regex.Pattern; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; -import org.springframework.util.CollectionUtils; /** * The condition operation. diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/JacksonUtils.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/JacksonUtils.java index 156069dc0e..854f22a416 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/JacksonUtils.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/JacksonUtils.java @@ -21,6 +21,7 @@ import java.util.Map; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectWriter; import org.slf4j.Logger; @@ -42,6 +43,10 @@ public final class JacksonUtils { private static final Logger LOG = LoggerFactory.getLogger(JacksonUtils.class); + static { + OM.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + } + private JacksonUtils() { } diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/OkHttpUtil.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/OkHttpUtil.java index 61a9d11cd3..e6c29543ee 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/OkHttpUtil.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/OkHttpUtil.java @@ -24,11 +24,11 @@ import java.util.Map; import java.util.concurrent.TimeUnit; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; /** * okhttp util. @@ -61,7 +61,7 @@ public static boolean get(String path, Map headers) { conn.setRequestMethod("GET"); conn.setConnectTimeout((int) TimeUnit.SECONDS.toMillis(2)); conn.setReadTimeout((int) TimeUnit.SECONDS.toMillis(2)); - if (!CollectionUtils.isEmpty(headers)) { + if (CollectionUtils.isNotEmpty(headers)) { headers.forEach(conn::setRequestProperty); } BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); @@ -71,7 +71,7 @@ public static boolean get(String path, Map headers) { buffer.append(str); } String responseBody = buffer.toString(); - if (conn.getResponseCode() == 200 && StringUtils.hasText(responseBody)) { + if (conn.getResponseCode() == 200 && StringUtils.isNotBlank(responseBody)) { LOGGER.debug("exec get request, url: {} success, response data: {}", url, responseBody); return true; } diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/ZuulFilterUtils.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/ZuulFilterUtils.java index 15719ad548..178d64c7ec 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/ZuulFilterUtils.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/ZuulFilterUtils.java @@ -17,12 +17,13 @@ package com.tencent.cloud.common.util; + import java.net.URL; import javax.servlet.http.HttpServletRequest; import com.netflix.zuul.context.RequestContext; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionLabelUtils.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionLabelUtils.java index ce5aefa581..3726d8d02f 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionLabelUtils.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionLabelUtils.java @@ -22,10 +22,9 @@ import java.util.List; import java.util.Map; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import io.netty.handler.codec.http.HttpHeaderNames; -import org.apache.commons.lang.StringUtils; - -import org.springframework.util.CollectionUtils; /** * the utils for parse label expression. diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionParserV1.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionParserV1.java index eebb996580..8fd5a271f3 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionParserV1.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionParserV1.java @@ -17,7 +17,7 @@ package com.tencent.cloud.common.util.expresstion; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; /** * Old custom expression resolver like ${http.query.key}、${http.header.key}. diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionParserV2.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionParserV2.java index 5fabcd2add..a6c233ff45 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionParserV2.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ExpressionParserV2.java @@ -17,7 +17,7 @@ package com.tencent.cloud.common.util.expresstion; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; /** * New custom expression resolver like $query.key、$header.key. diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ServletExpressionLabelUtils.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ServletExpressionLabelUtils.java index fe93b189c0..54a28c14ca 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ServletExpressionLabelUtils.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/ServletExpressionLabelUtils.java @@ -25,9 +25,9 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; -import org.springframework.util.CollectionUtils; /** * Parse labels from HttpServletRequest. diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/SpringWebExpressionLabelUtils.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/SpringWebExpressionLabelUtils.java index f39764c14f..6c57b0ed14 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/SpringWebExpressionLabelUtils.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/util/expresstion/SpringWebExpressionLabelUtils.java @@ -22,13 +22,13 @@ import java.util.Map; import java.util.Set; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.springframework.http.HttpCookie; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpRequest; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.util.CollectionUtils; import org.springframework.util.MultiValueMap; import org.springframework.web.server.ServerWebExchange; diff --git a/spring-cloud-tencent-commons/src/main/java/org/springframework/tsf/core/entity/Tag.java b/spring-cloud-tencent-commons/src/main/java/org/springframework/tsf/core/entity/Tag.java index b0348613ee..eec2374daa 100644 --- a/spring-cloud-tencent-commons/src/main/java/org/springframework/tsf/core/entity/Tag.java +++ b/spring-cloud-tencent-commons/src/main/java/org/springframework/tsf/core/entity/Tag.java @@ -22,9 +22,6 @@ import java.util.HashSet; import java.util.Set; -import com.google.gson.annotations.Expose; -import com.google.gson.annotations.SerializedName; - public class Tag implements Serializable { /** @@ -32,55 +29,10 @@ public class Tag implements Serializable { */ public static final int VERSION = 1; - public enum ControlFlag { - - /** - * tag transitive by all services. - */ - @SerializedName("0") - TRANSITIVE, - - /** - * tag not used in auth. - */ - @SerializedName("1") - NOT_IN_AUTH, - - /** - * tag not used in route. - */ - @SerializedName("2") - NOT_IN_ROUTE, - - /** - * tag not used in trace. - */ - @SerializedName("3") - NOT_IN_SLEUTH, - - /** - * tag not used in lane. - */ - @SerializedName("4") - NOT_IN_LANE, - - /** - * tag not used in unit. - */ - @SerializedName("5") - IN_UNIT - } - - @SerializedName("k") - @Expose private String key; - @SerializedName("v") - @Expose private String value; - @SerializedName("f") - @Expose private Set flags = new HashSet<>(); public Tag(String key, String value, ControlFlag... flags) { @@ -131,7 +83,6 @@ public int hashCode() { return (key == null ? 0 : key.hashCode()) + (flags == null ? 0 : flags.hashCode()); } - @Override public String toString() { return "Tag{" + @@ -140,4 +91,38 @@ public String toString() { ", flags=" + flags + '}'; } + + + public enum ControlFlag { + + /** + * tag transitive by all services. + */ + TRANSITIVE, + + /** + * tag not used in auth. + */ + NOT_IN_AUTH, + + /** + * tag not used in route. + */ + NOT_IN_ROUTE, + + /** + * tag not used in trace. + */ + NOT_IN_SLEUTH, + + /** + * tag not used in lane. + */ + NOT_IN_LANE, + + /** + * tag not used in unit. + */ + IN_UNIT + } } diff --git a/spring-cloud-tencent-coverage/pom.xml b/spring-cloud-tencent-coverage/pom.xml index cc1115c655..9be11f8dcf 100644 --- a/spring-cloud-tencent-coverage/pom.xml +++ b/spring-cloud-tencent-coverage/pom.xml @@ -8,6 +8,7 @@ ${revision} ../pom.xml + 4.0.0 spring-cloud-tencent-coverage @@ -84,21 +85,11 @@ spring-cloud-starter-tencent-discovery-adapter-plugin - - com.tencent.cloud - spring-cloud-tencent-featureenv-plugin - - com.tencent.cloud spring-cloud-starter-tencent-gateway-plugin - - com.tencent.cloud - spring-cloud-starter-tencent-discovery-adapter-plugin - - com.tencent.cloud spring-cloud-tencent-lossless-plugin diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index f8d1c904eb..f5c660a3f9 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -81,8 +81,6 @@ 4.5.1 1.12.19 2.15.3 - 3.21.7 - 2.9.9 2.0.2 1.33 2.9.1 @@ -244,25 +242,25 @@ - - com.google.guava - guava - ${guava.version} - - - jsr305 - com.google.code.findbugs - - - animal-sniffer-annotations - org.codehaus.mojo - - - error_prone_annotations - com.google.errorprone - - - + + + + + + + + + + + + + + + + + + + ch.qos.logback @@ -288,11 +286,6 @@ ${springdoc.version} - - com.google.protobuf - protobuf-java - ${protobuf-java.version} - net.bytebuddy @@ -301,11 +294,7 @@ - - joda-time - joda-time - ${joda-time.version} - + org.yaml diff --git a/spring-cloud-tencent-examples/metadata-transfer-example/metadata-frontend/src/main/java/com/tencent/cloud/metadata/service/frontend/MetadataMiddleServiceFallback.java b/spring-cloud-tencent-examples/metadata-transfer-example/metadata-frontend/src/main/java/com/tencent/cloud/metadata/service/frontend/MetadataMiddleServiceFallback.java index 444d1513c0..d5b81019f3 100644 --- a/spring-cloud-tencent-examples/metadata-transfer-example/metadata-frontend/src/main/java/com/tencent/cloud/metadata/service/frontend/MetadataMiddleServiceFallback.java +++ b/spring-cloud-tencent-examples/metadata-transfer-example/metadata-frontend/src/main/java/com/tencent/cloud/metadata/service/frontend/MetadataMiddleServiceFallback.java @@ -17,10 +17,9 @@ package com.tencent.cloud.metadata.service.frontend; +import java.util.HashMap; import java.util.Map; -import com.google.common.collect.Maps; - import org.springframework.stereotype.Component; /** @@ -33,6 +32,6 @@ public class MetadataMiddleServiceFallback implements MetadataMiddleService { @Override public Map> info() { - return Maps.newHashMap(); + return new HashMap<>(); } } diff --git a/spring-cloud-tencent-examples/metadata-transfer-example/metadata-middle/src/main/java/com/tencent/cloud/metadata/service/middle/MetadataBackendServiceFallback.java b/spring-cloud-tencent-examples/metadata-transfer-example/metadata-middle/src/main/java/com/tencent/cloud/metadata/service/middle/MetadataBackendServiceFallback.java index 3d53dd2278..e5d0018f38 100644 --- a/spring-cloud-tencent-examples/metadata-transfer-example/metadata-middle/src/main/java/com/tencent/cloud/metadata/service/middle/MetadataBackendServiceFallback.java +++ b/spring-cloud-tencent-examples/metadata-transfer-example/metadata-middle/src/main/java/com/tencent/cloud/metadata/service/middle/MetadataBackendServiceFallback.java @@ -17,10 +17,9 @@ package com.tencent.cloud.metadata.service.middle; +import java.util.HashMap; import java.util.Map; -import com.google.common.collect.Maps; - import org.springframework.stereotype.Component; /** @@ -33,6 +32,6 @@ public class MetadataBackendServiceFallback implements MetadataBackendService { @Override public Map> info() { - return Maps.newHashMap(); + return new HashMap<>(); } } diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/README-zh.md b/spring-cloud-tencent-examples/polaris-router-featureenv-example/README-zh.md deleted file mode 100644 index 63b19bd1c9..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/README-zh.md +++ /dev/null @@ -1,174 +0,0 @@ -# 多测试环境样例说明 - -[English](./README.md) | 简体中文 - -## 一、部署结构 - - - -如上图所示,一共有三个环境: - -1. 基线环境,包含 FrontService、MiddleService、BackendService -2. feature1 环境,包含 MiddleService、BackendService -3. feature2 环境,包含 FrontService、BackendService - -并且在入口处,部署网关服务。 - -三条请求链路: - -1. 基线环境链路,Gateway -> FrontService(基线) -> MiddleService(基线) -> BackendService(基线) -2. feature1 环境链路,Gateway -> FrontService(基线) -> MiddleService(feature1) -> BackendService(feature1) -3. feature2 环境链路,Gateway -> FrontService(feature2) -> MiddleService(基线) -> BackendService(feature2) - -## 二、运行样例 - -无需任何代码变更,直接启动 base、feature1、feature2、featureenv-gateway 下所有应用即可。 - -应用默认指向北极星官方的体验环境,启动成功后可直接到体验站点查看服务注册数据。 - -- 管控台地址: http://119.91.66.223:8080/ - - 账号:polaris - - 密码:polaris - -## 三、测试 - -### 方式一:客户端打标 - -#### 基线环境链路 - -```` -curl http://127.0.0.1:9999/featureenv-front-example/router/rest -```` - -响应结果(base 表示基线环境) - -```` -featureenv-front-example[base] -> featureenv-middle-example[base] -> featureenv-backend-example[base] -```` - -#### feature1 环境链路 - -通过 X-Polaris-Metadata-Transitive-featureenv 请求头指定特性环境。 - -```` -curl -H'X-Polaris-Metadata-Transitive-featureenv:feature1' http://127.0.0.1:9999/featureenv-front-example/router/rest -```` - -响应结果 - -```` -featureenv-front-example[base] -> featureenv-middle-example[feature1] -> featureenv-backend-example[feature1] -```` - -#### feature2 环境链路 - -通过 X-Polaris-Metadata-Transitive-featureenv 请求头指定特性环境。 - -```` -curl -H'X-Polaris-Metadata-Transitive-featureenv:feature2' http://127.0.0.1:9999/featureenv-front-example/router/rest -```` - -响应结果 - -```` -featureenv-front-example[feature2] -> featureenv-middle-example[base] -> featureenv-backend-example[feature2] -```` - -### 方式二:网关流量染色 - -模拟一种实际的场景,假设客户端请求有一个 uid 请求参数,期望: - -1. uid=1000 的请求打到 feature1 环境 -2. uid=2000 的请求打到 feature2 环境 -3. 其它 uid 的请求打到基线环境 - -**配置染色规则** - -配置地址:http://119.91.66.223:8080/#/filegroup-detail?group=featureenv-gateway&namespace=default - -修改 rule/staining.json 配置文件,填写以下规则: - -````json -{ - "rules": [ - { - "conditions": [ - { - "key": "${http.query.uid}", - "values": [ - "1000" - ], - "operation": "EQUALS" - } - ], - "labels": [ - { - "key": "featureenv", - "value": "feature1" - } - ] - }, - { - "conditions": [ - { - "key": "${http.query.uid}", - "values": [ - "2000" - ], - "operation": "EQUALS" - } - ], - "labels": [ - { - "key": "featureenv", - "value": "feature2" - } - ] - } - ] -} -```` - -填写完后发布配置即可。 - -#### 基线环境链路 - -```` -curl http://127.0.0.1:9999/featureenv-front-example/router/rest?uid=3000 -```` - -响应结果(base 表示基线环境) - -```` -featureenv-front-example[base] -> featureenv-middle-example[base] -> featureenv-backend-example[base] -```` - -#### feature1 环境链路 - -通过 X-Polaris-Metadata-Transitive-featureenv 请求头指定特性环境。 - -```` -curl http://127.0.0.1:9999/featureenv-front-example/router/rest?uid=1000 -```` - -响应结果 - -```` -featureenv-front-example[base] -> featureenv-middle-example[feature1] -> featureenv-backend-example[feature1] -```` - -#### feature2 环境链路 - -通过 X-Polaris-Metadata-Transitive-featureenv 请求头指定特性环境。 - -```` -curl http://127.0.0.1:9999/featureenv-front-example/router/rest?uid=2000 -```` - -响应结果 - -```` -featureenv-front-example[feature2] -> featureenv-middle-example[base] -> featureenv-backend-example[feature2] -```` - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/README.md b/spring-cloud-tencent-examples/polaris-router-featureenv-example/README.md deleted file mode 100644 index d79cec4a41..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/README.md +++ /dev/null @@ -1,179 +0,0 @@ -## A Multi-Feature Environment Example - -English | [简体中文](./README-zh.md) - -## I. Deployment Structure - -multi-feature environment structure - -As shown in the figure above, there are three environments. - -1. `baseline` environment, including `FrontService`, `MiddleService`, `BackendService` -2. `feature1` environment, including `MiddleService`, `BackendService` -3. `feature2` environment, including `FrontService`, `BackendService` - -And at the entrance, deploy the `gateway` service. - -Three request links. - -1. `baseline` environment link, `Gateway` -> `FrontService`(baseline) -> `MiddleService`(baseline) -> `BackendService`( - baseline) -2. `feature1` environment link, `Gateway` -> `FrontService`(baseline) -> `MiddleService`(feature1) -> `BackendService`( - feature1) -3. `feature2` environment link, `Gateway` -> `FrontService`(feature2) -> `MiddleService`(baseline) -> `BackendService`( - feature2) - -## II. Running - -Without any code changes, just start all the applications under `base`, `feature1`, `feature2`, `featureenv-gateway` -directly. - -By default, the applications point to the official Polaris experience environment, and you can directly view the service -registration data at the experience site after a successful launch. - -- Console address: http://119.91.66.223:8080/ - - Account: polaris - - Password: polaris - -## III. Testing - -### Mode 1: Client Request With `featureenv` Label - -#### `baseline` environment link - -```` -curl http://127.0.0.1:9999/featureenv-front-example/router/rest -```` - -Response results (base indicates baseline environment) - -```` -featureenv-front-example[base] -> featureenv-middle-example[base] -> featureenv-backend-example[base] -```` - -#### `feature1` environment link - -Specify the feature environment via the `X-Polaris-Metadata-Transitive-featureenv` request header. - -```` -curl -H'X-Polaris-Metadata-Transitive-featureenv:feature1' http://127.0.0.1:9999/featureenv-front-example/router/rest -```` - -Response results - -```` -featureenv-front-example[base] -> featureenv-middle-example[feature1] -> featureenv-backend-example[feature1] -```` - -#### `feature2` environment link - -Specify the feature environment via the `X-Polaris-Metadata-Transitive-featureenv` request header. - -```` -curl -H'X-Polaris-Metadata-Transitive-featureenv:feature2' http://127.0.0.1:9999/featureenv-front-example/router/rest -```` - -Response results - -```` -featureenv-front-example[feature2] -> featureenv-middle-example[base] -> featureenv-backend-example[feature2] -```` - -### Mode 2: Gateway traffic staining - -Simulate a real-world scenario, assuming that the client request has a uid request parameter and expects: - -1. `uid=1000` requests hit the `feature1` environment -2. `uid=2000` requests hit the `feature2` environment -3. requests with other uid hit the `baseline` environment - -**Configure coloring rules** - -Polaris Configuration Address: http://119.91.66.223:8080/#/filegroup-detail?group=featureenv-gateway&namespace=default - -Modify the `rule/staining.json` configuration file and fill in the following rule: - -````json -{ - "rules": [ - { - "conditions": [ - { - "key": "${http.query.uid}", - "values": [ - "1000" - ], - "operation": "EQUALS" - } - ], - "labels": [ - { - "key": "featureenv", - "value": "feature1" - } - ] - }, - { - "conditions": [ - { - "key": "${http.query.uid}", - "values": [ - "2000" - ], - "operation": "EQUALS" - } - ], - "labels": [ - { - "key": "featureenv", - "value": "feature2" - } - ] - } - ] -} -```` - -Just fill out and publish the configuration. - -#### `baseline` Environment Link - -```` -curl http://127.0.0.1:9999/featureenv-front-example/router/rest?uid=3000 -```` - -Response results (base indicates baseline environment) - -```` -featureenv-front-example[base] -> featureenv-middle-example[base] -> featureenv-backend-example[base] -```` - -#### `feature1` Environment Link - -Specify the feature environment via the `X-Polaris-Metadata-Transitive-featureenv` request header. - -```` -curl http://127.0.0.1:9999/featureenv-front-example/router/rest?uid=1000 -```` - -Response results - -```` -featureenv-front-example[base] -> featureenv-middle-example[feature1] -> featureenv-backend-example[feature1] -```` - -#### `feature2` Environment Link - -Specify the feature environment via the `X-Polaris-Metadata-Transitive-featureenv` request header. - -```` -curl http://127.0.0.1:9999/featureenv-front-example/router/rest?uid=2000 -```` - -Response results - -```` -featureenv-front-example[feature2] -> featureenv-middle-example[base] -> featureenv-backend-example[feature2] -```` - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/pom.xml deleted file mode 100644 index 4b1c3d1e45..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/pom.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - base - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - base-backend - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/basebackend/BackendController.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/basebackend/BackendController.java deleted file mode 100644 index 83849c940b..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/basebackend/BackendController.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.basebackend; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author lepdou 2022-07-20 - */ -@RestController -@RequestMapping("/router") -public class BackendController { - - @Value("${spring.application.name}") - private String appName; - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest() { - return appName + "[base]"; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/basebackend/BaseBackendApplication.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/basebackend/BaseBackendApplication.java deleted file mode 100644 index 7eb6d43e41..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/basebackend/BaseBackendApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.basebackend; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * @author lepdou 2022-07-20 - */ -@SpringBootApplication -@EnableFeignClients -public class BaseBackendApplication { - - public static void main(String[] args) { - SpringApplication.run(BaseBackendApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/resources/bootstrap.yml deleted file mode 100644 index 4ee62a4782..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-backend/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,15 +0,0 @@ -server: - session-timeout: 1800 - port: 10002 -spring: - application: - name: featureenv-backend-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true -logging: - level: - org.springframework.cloud.gateway: info - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/pom.xml deleted file mode 100644 index 38e365cf5e..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/pom.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - base - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - base-front - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/BaseFrontApplication.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/BaseFrontApplication.java deleted file mode 100644 index bdc7b90e6a..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/BaseFrontApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.basefront; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * @author lepdou 2022-07-20 - */ -@SpringBootApplication -@EnableFeignClients -public class BaseFrontApplication { - - public static void main(String[] args) { - SpringApplication.run(BaseFrontApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/FrontController.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/FrontController.java deleted file mode 100644 index b0226c362e..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/FrontController.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.basefront; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author lepdou 2022-07-20 - */ -@RestController -@RequestMapping("/router") -public class FrontController { - - @Value("${spring.application.name}") - private String appName; - - @Autowired - private MiddleService middleService; - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest() { - String curName = appName + "[base]"; - String resp = middleService.rest(); - - return curName + " -> " + resp; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/MiddleService.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/MiddleService.java deleted file mode 100644 index 7370da0b7c..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/basefront/MiddleService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.basefront; - -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; - -/** - * @author lepdou 2022-07-20 - */ -@FeignClient("featureenv-middle-example") -public interface MiddleService { - - @GetMapping("/router/rest") - String rest(); - -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/resources/bootstrap.yml deleted file mode 100644 index f97f3cc87a..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-front/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,15 +0,0 @@ -server: - session-timeout: 1800 - port: 10000 -spring: - application: - name: featureenv-front-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true -logging: - level: - org.springframework.cloud.gateway: info - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/pom.xml deleted file mode 100644 index 8b0ed00248..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/pom.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - base - com.tencent.cloud - ${revision} - ../pom.xml - - - 4.0.0 - - base-middle - - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/BackendService.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/BackendService.java deleted file mode 100644 index 0abc4bceee..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/BackendService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.basemiddle; - -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; - -/** - * @author lepdou 2022-07-20 - */ -@FeignClient("featureenv-backend-example") -public interface BackendService { - - @GetMapping("/router/rest") - String rest(); - -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/BaseMiddleApplication.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/BaseMiddleApplication.java deleted file mode 100644 index 9d6d99351c..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/BaseMiddleApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.basemiddle; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * @author lepdou 2022-07-20 - */ -@SpringBootApplication -@EnableFeignClients -public class BaseMiddleApplication { - - public static void main(String[] args) { - SpringApplication.run(BaseMiddleApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/MiddleController.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/MiddleController.java deleted file mode 100644 index d12e18cb89..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/basemiddle/MiddleController.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.basemiddle; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author lepdou 2022-07-20 - */ -@RestController -@RequestMapping("/router") -public class MiddleController { - - @Value("${spring.application.name}") - private String appName; - - @Autowired - private BackendService backendService; - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest() { - String curName = appName + "[base]"; - String resp = backendService.rest(); - - return curName + " -> " + resp; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/resources/bootstrap.yml deleted file mode 100644 index dc245a3799..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/base-middle/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,15 +0,0 @@ -server: - session-timeout: 1800 - port: 10001 -spring: - application: - name: featureenv-middle-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true -logging: - level: - org.springframework.cloud.gateway: info - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/pom.xml deleted file mode 100644 index 0dc0c3d3d9..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/base/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - polaris-router-featureenv-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - base - pom - - - base-front - base-middle - base-backend - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/pom.xml deleted file mode 100644 index 57fa48b178..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/pom.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - feature1 - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - feature1-backend - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1backend/BackendController.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1backend/BackendController.java deleted file mode 100644 index 3d83011f1a..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1backend/BackendController.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature1backend; - -import com.tencent.cloud.common.metadata.StaticMetadataManager; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author lepdou 2022-07-20 - */ -@RestController -@RequestMapping("/router") -public class BackendController { - - @Autowired - private StaticMetadataManager staticMetadataManager; - - @Value("${spring.application.name}") - private String appName; - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest() { - String featureEnv = staticMetadataManager.getMergedStaticMetadata().get("featureenv"); - return appName + "[" + featureEnv + "]"; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1backend/Feature1BackendApplication.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1backend/Feature1BackendApplication.java deleted file mode 100644 index e260c06164..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1backend/Feature1BackendApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature1backend; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * @author lepdou 2022-07-20 - */ -@SpringBootApplication -@EnableFeignClients -public class Feature1BackendApplication { - - public static void main(String[] args) { - SpringApplication.run(Feature1BackendApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/resources/bootstrap.yml deleted file mode 100644 index f5d64a10e4..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-backend/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,19 +0,0 @@ -server: - session-timeout: 1800 - port: 11002 -spring: - application: - name: featureenv-backend-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - tencent: - metadata: - content: - featureenv: feature1 -logging: - level: - org.springframework.cloud.gateway: info - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/pom.xml deleted file mode 100644 index 873bd1394e..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/pom.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - feature1 - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - feature1-middle - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/BackendService.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/BackendService.java deleted file mode 100644 index 5d62092525..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/BackendService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature1middle; - -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; - -/** - * @author lepdou 2022-07-20 - */ -@FeignClient("featureenv-backend-example") -public interface BackendService { - - @GetMapping("/router/rest") - String rest(); - -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/Feature1MiddleApplication.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/Feature1MiddleApplication.java deleted file mode 100644 index 76a80726b4..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/Feature1MiddleApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature1middle; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * @author lepdou 2022-07-20 - */ -@SpringBootApplication -@EnableFeignClients -public class Feature1MiddleApplication { - - public static void main(String[] args) { - SpringApplication.run(Feature1MiddleApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/MiddleController.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/MiddleController.java deleted file mode 100644 index 1b40723b84..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature1middle/MiddleController.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature1middle; - -import com.tencent.cloud.common.metadata.StaticMetadataManager; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author lepdou 2022-07-20 - */ -@RestController -@RequestMapping("/router") -public class MiddleController { - - @Value("${spring.application.name}") - private String appName; - - @Autowired - private BackendService backendService; - - @Autowired - private StaticMetadataManager staticMetadataManager; - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest() { - String featureEnv = staticMetadataManager.getMergedStaticMetadata().get("featureenv"); - - String curName = appName + "[" + featureEnv + "]"; - String resp = backendService.rest(); - - return curName + " -> " + resp; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/resources/bootstrap.yml deleted file mode 100644 index ddf1b53945..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/feature1-middle/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,19 +0,0 @@ -server: - session-timeout: 1800 - port: 11001 -spring: - application: - name: featureenv-middle-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - tencent: - metadata: - content: - featureenv: feature1 -logging: - level: - org.springframework.cloud.gateway: info - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/pom.xml deleted file mode 100644 index b364b109ca..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature1/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - polaris-router-featureenv-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - feature1 - pom - - - feature1-middle - feature1-backend - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/pom.xml deleted file mode 100644 index bc2f20a6fa..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/pom.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - feature2 - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - feature2-backend - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2backend/BackendController.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2backend/BackendController.java deleted file mode 100644 index d767659aaa..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2backend/BackendController.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature2backend; - -import com.tencent.cloud.common.metadata.StaticMetadataManager; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author lepdou 2022-07-20 - */ -@RestController -@RequestMapping("/router") -public class BackendController { - - @Autowired - private StaticMetadataManager staticMetadataManager; - - @Value("${spring.application.name}") - private String appName; - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest() { - String featureEnv = staticMetadataManager.getMergedStaticMetadata().get("featureenv"); - return appName + "[" + featureEnv + "]"; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2backend/Feature2BackendApplication.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2backend/Feature2BackendApplication.java deleted file mode 100644 index 6a0b1a65ba..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2backend/Feature2BackendApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature2backend; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * @author lepdou 2022-07-20 - */ -@SpringBootApplication -@EnableFeignClients -public class Feature2BackendApplication { - - public static void main(String[] args) { - SpringApplication.run(Feature2BackendApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/resources/bootstrap.yml deleted file mode 100644 index 2803ce6bb1..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-backend/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,19 +0,0 @@ -server: - session-timeout: 1800 - port: 12002 -spring: - application: - name: featureenv-backend-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - tencent: - metadata: - content: - featureenv: feature2 -logging: - level: - org.springframework.cloud.gateway: info - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/pom.xml deleted file mode 100644 index fb4268738e..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/pom.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - feature2 - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - feature2-front - - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/Feature2FrontApplication.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/Feature2FrontApplication.java deleted file mode 100644 index 23bd37c7d0..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/Feature2FrontApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature2front; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * @author lepdou 2022-07-20 - */ -@SpringBootApplication -@EnableFeignClients -public class Feature2FrontApplication { - - public static void main(String[] args) { - SpringApplication.run(Feature2FrontApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/FrontController.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/FrontController.java deleted file mode 100644 index 7dd64d18ce..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/FrontController.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature2front; - -import com.tencent.cloud.common.metadata.StaticMetadataManager; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author lepdou 2022-07-20 - */ -@RestController -@RequestMapping("/router") -public class FrontController { - - @Autowired - private StaticMetadataManager staticMetadataManager; - - @Value("${spring.application.name}") - private String appName; - - @Autowired - private MiddleService middleService; - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest() { - String featureEnv = staticMetadataManager.getMergedStaticMetadata().get("featureenv"); - - String curName = appName + "[" + featureEnv + "]"; - String resp = middleService.rest(); - - return curName + " -> " + resp; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/MiddleService.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/MiddleService.java deleted file mode 100644 index 436f6d38d5..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/java/com/tencent/cloud/polaris/router/featureenv/feature2front/MiddleService.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.router.featureenv.feature2front; - -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; - -/** - * @author lepdou 2022-07-20 - */ -@FeignClient("featureenv-middle-example") -public interface MiddleService { - - @GetMapping("/router/rest") - String rest(); - -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/resources/bootstrap.yml deleted file mode 100644 index 6937fc89f0..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/feature2-front/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,19 +0,0 @@ -server: - session-timeout: 1800 - port: 12000 -spring: - application: - name: featureenv-front-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - tencent: - metadata: - content: - featureenv: feature2 -logging: - level: - org.springframework.cloud.gateway: info - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/pom.xml deleted file mode 100644 index f14cbd7d6f..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/feature2/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - polaris-router-featureenv-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - feature2 - pom - - - feature2-front - feature2-backend - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/pom.xml deleted file mode 100644 index 698a9567e3..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - polaris-router-featureenv-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - featureenv-gateway - - - - - org.springframework.cloud - spring-cloud-starter-gateway - - - com.tencent.cloud - spring-cloud-starter-tencent-gateway-plugin - - - com.tencent.cloud - spring-cloud-tencent-featureenv-plugin - - - diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/src/main/java/com/tencent/cloud/polaris/featureenv/gateway/FeatureEnvScgApplication.java b/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/src/main/java/com/tencent/cloud/polaris/featureenv/gateway/FeatureEnvScgApplication.java deleted file mode 100644 index 9a0b6a1233..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/src/main/java/com/tencent/cloud/polaris/featureenv/gateway/FeatureEnvScgApplication.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.polaris.featureenv.gateway; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * @author lepdou 2022-07-20 - */ -@SpringBootApplication -public class FeatureEnvScgApplication { - - public static void main(String[] args) { - SpringApplication.run(FeatureEnvScgApplication.class, args); - } - -} diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/src/main/resources/bootstrap.yml deleted file mode 100644 index 9326f11e9a..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/featureenv-gateway/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,68 +0,0 @@ -server: - session-timeout: 1800 - port: 9999 -spring: - application: - name: featureenv-gateway - cloud: - tencent: - plugin: - scg: - staining: - enabled: true - rule-staining: - enabled: true - router: - feature-env: - enabled: true - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - gateway: - discovery: - locator: - enabled: true - 'predicates[0]': - name: Path - args: - patterns: '''/'' + serviceId + ''/**''' - 'filters[0]': - name: RewritePath - args: - regexp: '''/'' + serviceId + ''/(?.*)''' - replacement: '''/$\{remaining}''' - 'filters[1]': - name: Retry - args: - retries: 3 - exceptions: - '[0]': '''java.net.ConnectException''' - '[1]': '''java.io.IOException''' - statuses: - '[0]': '''BAD_GATEWAY''' - '[1]': '''SERVICE_UNAVAILABLE''' - series: - '[0]': '''CLIENT_ERROR''' - methods: - '[0]': '''GET''' - '[1]': '''POST''' - '[2]': '''PUT''' - '[3]': '''DELETE''' - backoff: - firstBackoff: '''100ms''' - maxBackoff: '''500ms''' - factor: 2 - basedOnPreviousValue: false - routes: - - id: featureenv-front-example - uri: lb://featureenv-front-example - predicates: - - Path=/featureenv-front-example/** - filters: - - StripPrefix=1 - -logging: - level: - org.springframework.cloud.gateway: info - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/imgs/structs.png b/spring-cloud-tencent-examples/polaris-router-featureenv-example/imgs/structs.png deleted file mode 100644 index 2b8a9c8a11853359c386603b7aeaae595f81163d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 56389 zcmce8WmuG57p{te0ivR`pi&|X-3uqe{ z9SgEYz1OaNz9#iX^n<~Y$xJP7_u9VqtsG1zhQ=A-w|9!TGypK=?zZ_UQOGEdFBWKbzIMHMLsGwSMyEwmMs zx&8d>1F_3LAFaFCn4kT9A@=qxVTSgf7o^un&92%2f0D1q|Nr`+&mc4`tj(QjCD@Wj zxv^Fs2Y01eVX^(Z;xWuoulLUDGUX^$@1mYC^o`eLicyAd`Hgx~BavlO8X5cFm7^fN zvDxtxut5sG*c=%GUT~msPwXqEffSXz&O8YXbUHd@h-2PQHim1{-d|q*9!5_t>b>`V z4+$*bLl#J}J+n`xdTJFlh$&9?M<+s&UI9z1p@bN34_XX8419)cEb5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Wgq zQ3tSmPo&k1nP&picPZ6je_MK-k_3?3l58PahS>{}27$~3Auxb~mWgrR^4J*4#bFe* z`zAnk33tk$#c-!Uzr*m_fp6MI%g{TT-93(l5d=fex^VgI!L?Jq%%iC!C{p(V<)E9V z>$0z5Wv{seFF{(h0_;k?i(@_U2cGzY61!dq$Act=VF!|r{n+V@{>h^U?qKJ_(_Wz4 z_u%KBdR)Uk)1DCGy2QA|v;+Y&y7+YoIJF=#Xq)J|pT`ww9jP67szudp)S!H1 z`dbQcS}zSu$F}ITG4M_q`0kqH%H%k0At|Th80AONb3O6rdIjgNf|(*eB~)RX^YTqO z#4{Iz(-_ERn$D=GWHQP+M?Ft^-Dm`YOVqP=2g4^P$72nufa%*WG?I5sSk@DXb6Ph! z(MUXgu{(Zt;0OG???Zq(Y1aY>wYZlW3>&L_fbGz$(wmsPPEOw!ljPDrMgdWW8lWF~eu(k~gCuGcT)4sHEqJ=jqlZ-=HfJ@agGv6vjK4bmP4h#d* zTt<>kuuUr6fF|^(`w)AJxBU293BFG(8tE5_^>)O*P6a+P z2{~>7N#iSkk+0!O891`WhHU)3<#^vh4A{f@hnP3)+HiKKz{1=_9em})sOwZ@tWTUj vv(&z;e<%K6{fuF`vYh5V`M(+_KWti*?78`At5*6e%kigB;^F#`zhwR!Kny&f diff --git a/spring-cloud-tencent-examples/polaris-router-featureenv-example/pom.xml b/spring-cloud-tencent-examples/polaris-router-featureenv-example/pom.xml deleted file mode 100644 index c9308f4ba0..0000000000 --- a/spring-cloud-tencent-examples/polaris-router-featureenv-example/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - spring-cloud-tencent-examples - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-router-featureenv-example - pom - - - base - feature1 - feature2 - featureenv-gateway - - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - com.tencent.cloud - spring-cloud-tencent-featureenv-plugin - - - diff --git a/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/pom.xml b/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/pom.xml index 6f602207d4..085bb8fc12 100644 --- a/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/pom.xml +++ b/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/pom.xml @@ -1,6 +1,6 @@ - spring-cloud-tencent-examples @@ -15,7 +15,6 @@ 4.0.0 - com.tencent.polaris polaris-router-grayrelease-lane-example pom diff --git a/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-callee-service/pom.xml b/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-callee-service/pom.xml index 3431f03d08..b54fc993cd 100644 --- a/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-callee-service/pom.xml +++ b/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-callee-service/pom.xml @@ -1,10 +1,10 @@ - 4.0.0 - com.tencent.polaris + com.tencent.cloud polaris-router-grayrelease-lane-example ${revision} ../pom.xml diff --git a/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-caller-service/pom.xml b/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-caller-service/pom.xml index f1a48d81bd..e24c801794 100644 --- a/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-caller-service/pom.xml +++ b/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-caller-service/pom.xml @@ -1,10 +1,10 @@ - 4.0.0 - com.tencent.polaris + com.tencent.cloud polaris-router-grayrelease-lane-example ${revision} ../pom.xml diff --git a/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-gateway/pom.xml b/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-gateway/pom.xml index efd0edff1b..81e3214b49 100644 --- a/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-gateway/pom.xml +++ b/spring-cloud-tencent-examples/polaris-router-grayrelease-lane-example/router-grayrelease-lane-gateway/pom.xml @@ -1,10 +1,10 @@ - 4.0.0 - com.tencent.polaris + com.tencent.cloud polaris-router-grayrelease-lane-example ${revision} ../pom.xml diff --git a/spring-cloud-tencent-examples/pom.xml b/spring-cloud-tencent-examples/pom.xml index 8eccfd4446..76f0fedcbf 100644 --- a/spring-cloud-tencent-examples/pom.xml +++ b/spring-cloud-tencent-examples/pom.xml @@ -19,7 +19,6 @@ multiple-discovery-example metadata-transfer-example polaris-router-grayrelease-example - polaris-router-featureenv-example quickstart-example lossless-example polaris-router-grayrelease-lane-example @@ -29,4 +28,27 @@ true + + + + org.springframework.boot + spring-boot-starter-logging + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/pom.xml b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/pom.xml index ce65881181..65a869a811 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/pom.xml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/pom.xml @@ -29,33 +29,4 @@ spring-boot-starter-actuator - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.0 - - - attach-sources - - jar - - - - - - diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/pom.xml b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/pom.xml index 0f3495e9e2..ac9097549c 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/pom.xml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/pom.xml @@ -29,33 +29,4 @@ spring-boot-starter-actuator - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.0 - - - attach-sources - - jar - - - - - - diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/pom.xml b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/pom.xml index cc72331c65..1c4860a581 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/pom.xml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/pom.xml @@ -39,33 +39,4 @@ spring-boot-starter-actuator - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.0 - - - attach-sources - - jar - - - - - - diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/pom.xml b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/pom.xml index 4428cc570d..81e4e1df90 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/pom.xml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/pom.xml @@ -19,43 +19,9 @@ spring-cloud-starter-tencent-all - - com.tencent.cloud - spring-cloud-starter-tencent-gateway-plugin - - org.springframework.cloud spring-cloud-starter-gateway - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.0 - - - attach-sources - - jar - - - - - - diff --git a/spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml b/spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml index ca0dc43583..04f4a8314a 100644 --- a/spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml +++ b/spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml @@ -27,33 +27,4 @@ spring-cloud-starter-openfeign - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.0 - - - attach-sources - - jar - - - - - - \ No newline at end of file diff --git a/spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml b/spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml index 88adb4e5e1..4a714aded1 100644 --- a/spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml +++ b/spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml @@ -25,33 +25,4 @@ spring-boot-starter-actuator - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.0 - - - attach-sources - - jar - - - - - - \ No newline at end of file diff --git a/spring-cloud-tencent-examples/tsf-example/provider-demo/src/main/java/com/tencent/cloud/tsf/demo/provider/swagger/controller/SwaggerApiController.java b/spring-cloud-tencent-examples/tsf-example/provider-demo/src/main/java/com/tencent/cloud/tsf/demo/provider/swagger/controller/SwaggerApiController.java index f898637cb6..6a2656fd73 100644 --- a/spring-cloud-tencent-examples/tsf-example/provider-demo/src/main/java/com/tencent/cloud/tsf/demo/provider/swagger/controller/SwaggerApiController.java +++ b/spring-cloud-tencent-examples/tsf-example/provider-demo/src/main/java/com/tencent/cloud/tsf/demo/provider/swagger/controller/SwaggerApiController.java @@ -18,11 +18,11 @@ package com.tencent.cloud.tsf.demo.provider.swagger.controller; import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; -import com.google.common.collect.Lists; import com.tencent.cloud.tsf.demo.provider.swagger.model.MessageBox; import com.tencent.cloud.tsf.demo.provider.swagger.model.MessageModel; import com.tencent.cloud.tsf.demo.provider.swagger.model.MessageUser; @@ -66,7 +66,7 @@ public List findMessages(@RequestBody messageReceiver.setName("拜登"); messageReceiver.setOfficeAddress("华盛顿白宫"); messageReceiver.setPhoneNum("911911911"); - messageModel.setReceiveUsers(Lists.newArrayList(messageReceiver)); + messageModel.setReceiveUsers(Collections.singletonList(messageReceiver)); messageModels.add(messageModel); return messageModels; } @@ -103,7 +103,7 @@ public MessageModel getMessageDetail(@RequestParam(name = "id") messageReceiver.setName("拜登"); messageReceiver.setOfficeAddress("华盛顿白宫"); messageReceiver.setPhoneNum("911911911"); - messageModel.setReceiveUsers(Lists.newArrayList(messageReceiver)); + messageModel.setReceiveUsers(Collections.singletonList(messageReceiver)); return messageModel; } diff --git a/spring-cloud-tencent-plugin-starters/pom.xml b/spring-cloud-tencent-plugin-starters/pom.xml index 67ad734d84..1ba1a63220 100644 --- a/spring-cloud-tencent-plugin-starters/pom.xml +++ b/spring-cloud-tencent-plugin-starters/pom.xml @@ -15,7 +15,6 @@ Spring Cloud Starter Tencent Solution - spring-cloud-tencent-featureenv-plugin spring-cloud-starter-tencent-gateway-plugin spring-cloud-starter-tencent-discovery-adapter-plugin spring-cloud-tencent-lossless-plugin diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/pom.xml b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/pom.xml index 5638897e4c..9bc116cabf 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/pom.xml +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/pom.xml @@ -26,17 +26,9 @@ 2.2.9.RELEASE true - - org.springframework.boot - spring-boot-starter-test - test - - - - org.mockito - mockito-inline - test + com.tencent.cloud + spring-cloud-tencent-polaris-loadbalancer diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/src/main/java/com/tencent/cloud/plugin/discovery/adapter/transformer/NacosInstanceTransformer.java b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/src/main/java/com/tencent/cloud/plugin/discovery/adapter/transformer/NacosInstanceTransformer.java index 8fad7ba559..fbe0cc9e57 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/src/main/java/com/tencent/cloud/plugin/discovery/adapter/transformer/NacosInstanceTransformer.java +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/src/main/java/com/tencent/cloud/plugin/discovery/adapter/transformer/NacosInstanceTransformer.java @@ -22,6 +22,7 @@ import com.tencent.cloud.polaris.loadbalancer.transformer.InstanceTransformer; import com.tencent.polaris.api.pojo.DefaultInstance; + /** * NacosInstanceTransformer. * @@ -38,4 +39,5 @@ public void transformCustom(DefaultInstance instance, Server server) { instance.setMetadata(nacosServer.getMetadata()); } } + } diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/src/test/java/com/tencent/cloud/plugin/discovery/adapter/config/NacosDiscoveryAdapterAutoConfigurationTest.java b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/src/test/java/com/tencent/cloud/plugin/discovery/adapter/config/NacosDiscoveryAdapterAutoConfigurationTest.java index b002ae13b5..9e61678285 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/src/test/java/com/tencent/cloud/plugin/discovery/adapter/config/NacosDiscoveryAdapterAutoConfigurationTest.java +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/src/test/java/com/tencent/cloud/plugin/discovery/adapter/config/NacosDiscoveryAdapterAutoConfigurationTest.java @@ -23,7 +23,6 @@ import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; -import org.springframework.cloud.client.loadbalancer.LoadBalancerAutoConfiguration; import static org.assertj.core.api.Assertions.assertThat; @@ -35,10 +34,7 @@ public class NacosDiscoveryAdapterAutoConfigurationTest { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() - .withConfiguration(AutoConfigurations.of( - NacosDiscoveryAdapterAutoConfiguration.class, - LoadBalancerAutoConfiguration.class - )); + .withConfiguration(AutoConfigurations.of(NacosDiscoveryAdapterAutoConfiguration.class)); @Test public void testDefaultInitialization() { diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-fault-tolerance/pom.xml b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-fault-tolerance/pom.xml index f22d224e76..26742c5acd 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-fault-tolerance/pom.xml +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-fault-tolerance/pom.xml @@ -14,20 +14,24 @@ Spring Cloud Starter Tencent Fault Tolerance Plugin - - org.springframework.cloud - spring-cloud-context - - org.springframework.boot spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-logging + + + org.springframework.boot + spring-boot-starter + + org.springframework.boot - spring-boot-starter-test - test + spring-boot-autoconfigure diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-gateway-plugin/pom.xml b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-gateway-plugin/pom.xml index 49536e26c0..64bbb59911 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-gateway-plugin/pom.xml +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-gateway-plugin/pom.xml @@ -36,17 +36,5 @@ spring-boot-starter-webflux true - - - org.springframework.boot - spring-boot-starter-test - test - - - - org.mockito - mockito-inline - test - diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-gateway-plugin/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-gateway-plugin/src/main/resources/META-INF/additional-spring-configuration-metadata.json deleted file mode 100644 index a54b4b3fbb..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-gateway-plugin/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "properties": [ - { - "name": "spring.cloud.tencent.plugin.scg.enabled", - "type": "java.lang.Boolean", - "defaultValue": true, - "description": "the switch for spring cloud gateway plugin." - }, - { - "name": "spring.cloud.tencent.plugin.scg.staining.enabled", - "type": "java.lang.Boolean", - "defaultValue": false, - "description": "the switch for spring cloud gateway staining plugin." - }, - { - "name": "spring.cloud.tencent.plugin.scg.staining.rule-staining.enabled", - "type": "java.lang.Boolean", - "defaultValue": true, - "description": "the switch for spring cloud gateway rule staining plugin." - }, - { - "name": "spring.cloud.tencent.plugin.scg.staining.rule-staining.namespace", - "type": "java.lang.String", - "defaultValue": "default", - "description": "The namespace used to config staining rules." - }, - { - "name": "spring.cloud.tencent.plugin.scg.staining.rule-staining.group", - "type": "java.lang.String", - "defaultValue": "${spring.application.name}", - "description": "The group used to config staining rules." - }, - { - "name": "spring.cloud.tencent.plugin.scg.staining.rule-staining.fileName", - "type": "java.lang.String", - "defaultValue": "rule/staining.json", - "description": "The file name used to config staining rules." - } - ] -} diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-threadlocal-plugin/pom.xml b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-threadlocal-plugin/pom.xml index 91975c1411..3b4561718c 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-threadlocal-plugin/pom.xml +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-threadlocal-plugin/pom.xml @@ -21,14 +21,9 @@ - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-test - test + org.springframework + spring-core + provided diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-trace-plugin/pom.xml b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-trace-plugin/pom.xml index 99fe4f187e..d2f5b89b48 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-trace-plugin/pom.xml +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-trace-plugin/pom.xml @@ -1,4 +1,4 @@ - spring-cloud-tencent-plugin-starters @@ -16,9 +16,5 @@ com.tencent.cloud spring-cloud-tencent-rpc-enhancement - - com.tencent.polaris - trace-otel - diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/pom.xml b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/pom.xml deleted file mode 100644 index 25cce93dd8..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - spring-cloud-tencent-plugin-starters - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - spring-cloud-tencent-featureenv-plugin - Spring Cloud Tencent Feature Environment Plugin - - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-router - - - - org.springframework.boot - spring-boot-starter-test - test - - - - diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvAutoConfiguration.java b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvAutoConfiguration.java deleted file mode 100644 index 866b5873d4..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvAutoConfiguration.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.plugin.featureenv; - -import com.tencent.cloud.polaris.context.ConditionalOnPolarisEnabled; - -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * Auto configuration for feature env. - * @author lepdou 2022-07-06 - */ -@Configuration -@ConditionalOnPolarisEnabled -@ConditionalOnProperty(value = "spring.cloud.tencent.plugin.router.feature-env.enabled", matchIfMissing = true) -public class FeatureEnvAutoConfiguration { - - @Bean - public FeatureEnvProperties featureEnvProperties() { - return new FeatureEnvProperties(); - } - - @Bean - public FeatureEnvRouterRequestInterceptor featureEnvRouterRequestInterceptor() { - return new FeatureEnvRouterRequestInterceptor(); - } -} diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvProperties.java b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvProperties.java deleted file mode 100644 index 8d49bf410e..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvProperties.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.plugin.featureenv; - -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * The properties for feature env. - * @author lepdou 2022-07-12 - */ -@ConfigurationProperties("spring.cloud.tencent.plugin.router.feature-env") -public class FeatureEnvProperties { - - private boolean enabled; - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } -} diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvRouterRequestInterceptor.java b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvRouterRequestInterceptor.java deleted file mode 100644 index a3a8e7eff3..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/java/com/tencent/cloud/plugin/featureenv/FeatureEnvRouterRequestInterceptor.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.plugin.featureenv; - -import java.util.HashSet; -import java.util.Set; - -import com.tencent.cloud.polaris.router.PolarisRouterContext; -import com.tencent.cloud.polaris.router.spi.RouterRequestInterceptor; -import com.tencent.polaris.api.pojo.RouteArgument; -import com.tencent.polaris.api.rpc.MetadataFailoverType; -import com.tencent.polaris.plugins.router.metadata.MetadataRouter; -import com.tencent.polaris.router.api.rpc.ProcessRoutersRequest; -import org.apache.commons.lang.StringUtils; - -/** - * Build metadata router context for feature env scene. - * @author lepdou 2022-07-06 - */ -public class FeatureEnvRouterRequestInterceptor implements RouterRequestInterceptor { - - private static final String LABEL_KEY_FEATURE_ENV_ROUTER_KEY = "system-feature-env-router-label"; - private static final String DEFAULT_FEATURE_ENV_ROUTER_LABEL = "featureenv"; - private static final String NOT_EXISTED_ENV = "NOT_EXISTED_ENV"; - - @Override - public void apply(ProcessRoutersRequest request, PolarisRouterContext routerContext) { - //1. get feature env router label key - String envLabelKey = routerContext.getLabel(LABEL_KEY_FEATURE_ENV_ROUTER_KEY); - if (StringUtils.isBlank(envLabelKey)) { - envLabelKey = DEFAULT_FEATURE_ENV_ROUTER_LABEL; - } - - //2. get feature env router label value - String envLabelValue = routerContext.getLabel(envLabelKey); - if (envLabelValue == null) { - // router to base env when not matched feature env - envLabelValue = NOT_EXISTED_ENV; - } - - //3. set env metadata to router request - Set routeArguments = new HashSet<>(1); - routeArguments.add(RouteArgument.buildCustom(envLabelKey, envLabelValue)); - - request.putRouterArgument(MetadataRouter.ROUTER_TYPE_METADATA, routeArguments); - - - //4. set failover type to others - request.setMetadataFailoverType(MetadataFailoverType.METADATAFAILOVERNOTKEY); - } -} diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/resources/META-INF/additional-spring-configuration-metadata.json deleted file mode 100644 index e67ca364ee..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "properties": [ - { - "name": "spring.cloud.tencent.plugin.router.feature-env.enabled", - "type": "java.lang.Boolean", - "defaultValue": true, - "description": "the switch for feature env plugin." - } - ] -} diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/resources/META-INF/spring.factories b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/resources/META-INF/spring.factories deleted file mode 100644 index b61fbdfab2..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.tencent.cloud.plugin.featureenv.FeatureEnvAutoConfiguration diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/test/java/com/tencent/cloud/plugin/featureenv/FeatureEnvAutoConfigurationTest.java b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/test/java/com/tencent/cloud/plugin/featureenv/FeatureEnvAutoConfigurationTest.java deleted file mode 100644 index 81f3247baf..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/test/java/com/tencent/cloud/plugin/featureenv/FeatureEnvAutoConfigurationTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.plugin.featureenv; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; - -import org.springframework.boot.autoconfigure.AutoConfigurations; -import org.springframework.boot.test.context.runner.ApplicationContextRunner; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Test for {@link FeatureEnvAutoConfiguration}. - * - * @author Hoatian Zhang - */ -@ExtendWith(MockitoExtension.class) -public class FeatureEnvAutoConfigurationTest { - - private final ApplicationContextRunner enabledApplicationContextRunner = new ApplicationContextRunner(); - private final ApplicationContextRunner disabledApplicationContextRunner = new ApplicationContextRunner(); - - @Test - public void testEnabled() { - this.enabledApplicationContextRunner.withConfiguration(AutoConfigurations.of(FeatureEnvAutoConfiguration.class)) - .run(context -> { - assertThat(context).hasSingleBean(FeatureEnvProperties.class); - assertThat(context).hasSingleBean(FeatureEnvRouterRequestInterceptor.class); - }); - } - - @Test - public void testDisabled() { - this.disabledApplicationContextRunner.withConfiguration(AutoConfigurations.of(FeatureEnvAutoConfiguration.class)) - .withPropertyValues("spring.cloud.tencent.plugin.router.feature-env.enabled=false") - .run(context -> { - assertThat(context).doesNotHaveBean(FeatureEnvProperties.class); - assertThat(context).doesNotHaveBean(FeatureEnvRouterRequestInterceptor.class); - }); - } -} diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/test/java/com/tencent/cloud/plugin/featureenv/FeatureEnvRouterRequestInterceptorTest.java b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/test/java/com/tencent/cloud/plugin/featureenv/FeatureEnvRouterRequestInterceptorTest.java deleted file mode 100644 index ae9683407d..0000000000 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-featureenv-plugin/src/test/java/com/tencent/cloud/plugin/featureenv/FeatureEnvRouterRequestInterceptorTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making spring-cloud-tencent available. - * - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package com.tencent.cloud.plugin.featureenv; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -import com.tencent.cloud.common.constant.RouterConstant; -import com.tencent.cloud.polaris.router.PolarisRouterContext; -import com.tencent.polaris.api.pojo.DefaultServiceInstances; -import com.tencent.polaris.api.pojo.ServiceInstances; -import com.tencent.polaris.api.pojo.ServiceKey; -import com.tencent.polaris.plugins.router.metadata.MetadataRouter; -import com.tencent.polaris.router.api.rpc.ProcessRoutersRequest; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; -import org.mockito.junit.jupiter.MockitoExtension; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Test for {@link FeatureEnvRouterRequestInterceptor}. - * @author lepdou 2022-07-12 - */ -@ExtendWith(MockitoExtension.class) -public class FeatureEnvRouterRequestInterceptorTest { - - @Test - public void testDefaultRouterKey() { - Map labels = new HashMap<>(); - labels.put("featureenv", "blue"); - PolarisRouterContext routerContext = new PolarisRouterContext(); - routerContext.putLabels(RouterConstant.ROUTER_LABELS, labels); - - ProcessRoutersRequest request = new ProcessRoutersRequest(); - ServiceInstances serviceInstances = new DefaultServiceInstances(Mockito.mock(ServiceKey.class), new ArrayList<>()); - request.setDstInstances(serviceInstances); - - FeatureEnvRouterRequestInterceptor interceptor = new FeatureEnvRouterRequestInterceptor(); - - interceptor.apply(request, routerContext); - - Map metadataRouterLabels = request.getRouterMetadata().get(MetadataRouter.ROUTER_TYPE_METADATA); - assertThat(metadataRouterLabels.size()).isEqualTo(1); - assertThat(metadataRouterLabels.get("featureenv")).isEqualTo("blue"); - } - - @Test - public void testSpecifyRouterKey() { - Map labels = new HashMap<>(); - labels.put("system-feature-env-router-label", "specify-env"); - labels.put("specify-env", "blue"); - PolarisRouterContext routerContext = new PolarisRouterContext(); - routerContext.putLabels(RouterConstant.ROUTER_LABELS, labels); - - ProcessRoutersRequest request = new ProcessRoutersRequest(); - ServiceInstances serviceInstances = new DefaultServiceInstances(Mockito.mock(ServiceKey.class), new ArrayList<>()); - request.setDstInstances(serviceInstances); - - FeatureEnvRouterRequestInterceptor interceptor = new FeatureEnvRouterRequestInterceptor(); - - interceptor.apply(request, routerContext); - - Map metadataRouterLabels = request.getRouterMetadata().get(MetadataRouter.ROUTER_TYPE_METADATA); - assertThat(metadataRouterLabels.size()).isEqualTo(1); - assertThat(metadataRouterLabels.get("specify-env")).isEqualTo("blue"); - } - - @Test - public void testNotExistedEnvLabel() { - Map labels = new HashMap<>(); - labels.put("system-feature-env-router-label", "specify-env"); - PolarisRouterContext routerContext = new PolarisRouterContext(); - routerContext.putLabels(RouterConstant.ROUTER_LABELS, labels); - - ProcessRoutersRequest request = new ProcessRoutersRequest(); - ServiceInstances serviceInstances = new DefaultServiceInstances(Mockito.mock(ServiceKey.class), new ArrayList<>()); - request.setDstInstances(serviceInstances); - - FeatureEnvRouterRequestInterceptor interceptor = new FeatureEnvRouterRequestInterceptor(); - - interceptor.apply(request, routerContext); - - Map metadataRouterLabels = request.getRouterMetadata().get(MetadataRouter.ROUTER_TYPE_METADATA); - assertThat(metadataRouterLabels.size()).isEqualTo(1); - assertThat(metadataRouterLabels.get("specify-env")).isEqualTo("NOT_EXISTED_ENV"); - } -} diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-lossless-plugin/pom.xml b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-lossless-plugin/pom.xml index 2cd2864210..84c9f10b83 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-lossless-plugin/pom.xml +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-lossless-plugin/pom.xml @@ -20,50 +20,20 @@ spring-cloud-tencent-rpc-enhancement - - com.tencent.polaris - lossless-register - - - - com.tencent.polaris - lossless-deregister - - - - com.tencent.polaris - lossless-warmup - - org.springframework.boot spring-boot-starter-aop - - - - org.springframework.boot - spring-boot-starter-test - test - - - - org.springframework.boot - spring-boot-starter-web - test - - - - com.tencent.polaris - polaris-test-mock-discovery - test - junit - junit + org.springframework.boot + spring-boot-starter-logging + + + org.springframework.boot + spring-boot-starter - diff --git a/spring-cloud-tencent-polaris-context/pom.xml b/spring-cloud-tencent-polaris-context/pom.xml index 375fe77991..ce2c0a6d4d 100644 --- a/spring-cloud-tencent-polaris-context/pom.xml +++ b/spring-cloud-tencent-polaris-context/pom.xml @@ -21,221 +21,10 @@ - - com.tencent.polaris - polaris-discovery-factory - - - com.tencent.polaris - router-rule - - - com.tencent.polaris - router-nearby - - - com.tencent.polaris - router-namespace - - - com.tencent.polaris - router-metadata - - - com.tencent.polaris - router-canary - - - com.tencent.polaris - router-set - - - - - - com.tencent.polaris - polaris-circuitbreaker-factory - - - com.tencent.polaris - router-rule - - - com.tencent.polaris - router-nearby - - - com.tencent.polaris - router-metadata - - - com.tencent.polaris - circuitbreaker-errrate - - - com.tencent.polaris - circuitbreaker-errcount - - - com.tencent.polaris - circuitbreaker-composite - - - com.tencent.polaris - stat-prometheus - - - com.tencent.polaris - healthchecker-http - - - com.tencent.polaris - healthchecker-tcp - - - com.tencent.polaris - healthchecker-udp - - - - - - com.tencent.polaris - polaris-ratelimit-factory - - - com.tencent.polaris - router-rule - - - com.tencent.polaris - router-nearby - - - com.tencent.polaris - router-namespace - - - com.tencent.polaris - router-metadata - - - com.tencent.polaris - ratelimiter-reject - - - com.tencent.polaris - ratelimiter-unirate - - - com.tencent.polaris - stat-prometheus - - - - - - com.tencent.polaris - polaris-auth-factory - - - - com.tencent.polaris - polaris-client - - - - com.tencent.polaris - polaris-plugin-api - - - - com.tencent.polaris - connector-polaris-grpc - - - junit - junit - - - - - - com.tencent.polaris - connector-consul - - - - com.tencent.polaris - connector-nacos - - - - com.tencent.polaris - connector-composite - - - - com.tencent.polaris - registry-memory - - - error_prone_annotations - com.google.errorprone - - - j2objc-annotations - com.google.j2objc - - - - - - com.tencent.polaris - flow-cache-expired - - - - com.tencent.polaris - polaris-router-factory - - - - com.tencent.polaris - polaris-circuitbreaker-factory - - - - com.tencent.polaris - polaris-ratelimit-factory - - - - com.tencent.polaris - loadbalancer-random - - - - com.tencent.polaris - loadbalancer-ringhash - - - - com.tencent.polaris - polaris-assembly-factory - - - - com.tencent.polaris - event-tsf - - - - - org.springframework.boot - spring-boot-starter-test - test + org.springframework + spring-web + provided diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/ModifyAddress.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/ModifyAddress.java index 780a526c89..a2fb63e86b 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/ModifyAddress.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/ModifyAddress.java @@ -23,10 +23,9 @@ import com.tencent.cloud.common.constant.OrderConstant; import com.tencent.cloud.common.util.AddressUtils; import com.tencent.cloud.polaris.context.config.PolarisContextProperties; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.factory.config.ConfigurationImpl; -import org.apache.commons.lang.StringUtils; - -import org.springframework.util.CollectionUtils; /** * Modify polaris server address. diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/PostInitPolarisSDKContext.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/PostInitPolarisSDKContext.java index 0fe48f21f9..93c86eb929 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/PostInitPolarisSDKContext.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/PostInitPolarisSDKContext.java @@ -19,9 +19,9 @@ import com.tencent.cloud.common.metadata.StaticMetadataManager; import com.tencent.polaris.api.plugin.common.ValueContext; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.client.api.SDKContext; import com.tencent.polaris.specification.api.v1.traffic.manage.RoutingProto; -import org.apache.commons.lang.StringUtils; /** * After all configurations are loaded, post-initialize SDKContext. diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/PolarisContextProperties.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/PolarisContextProperties.java index 4274b30836..d534c1e9b0 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/PolarisContextProperties.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/PolarisContextProperties.java @@ -26,13 +26,13 @@ import com.tencent.cloud.polaris.context.PolarisConfigModifier; import com.tencent.polaris.api.config.ConfigProvider; import com.tencent.polaris.api.config.Configuration; +import com.tencent.polaris.api.utils.CollectionUtils; +import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.factory.ConfigAPIFactory; import com.tencent.polaris.factory.config.ConfigurationImpl; -import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.util.CollectionUtils; /** * Properties for Polaris {@link com.tencent.polaris.client.api.SDKContext}. diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/consul/ConsulProperties.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/consul/ConsulProperties.java index 7f254fde78..736d9c4a90 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/consul/ConsulProperties.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/consul/ConsulProperties.java @@ -19,7 +19,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.validation.annotation.Validated; /** * Copy from org.springframework.cloud.consul.ConsulProperties. @@ -27,7 +26,6 @@ * @author Spencer Gibb */ @ConfigurationProperties(ConsulProperties.PREFIX) -@Validated public class ConsulProperties { /** diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfCoreEnvironmentPostProcessor.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfCoreEnvironmentPostProcessor.java index 73c0317ef6..a3261d2f6e 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfCoreEnvironmentPostProcessor.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfCoreEnvironmentPostProcessor.java @@ -123,13 +123,12 @@ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringAp defaultProperties.put("spring.cloud.consul.discovery.register", "true"); defaultProperties.put("spring.cloud.consul.discovery.instance-id", tsfInstanceId); defaultProperties.put("spring.cloud.polaris.discovery.instance-id", tsfInstanceId); - defaultProperties.put("spring.cloud.polaris.discovery.zero-protection.enabled", "true"); - defaultProperties.put("spring.cloud.polaris.discovery.zero-protection.is-need-test-connectivity", "true"); + defaultProperties.put("spring.cloud.polaris.discovery.zero-protection.enabled", + environment.getProperty("spring.cloud.polaris.zero-protection.enabled", "true")); + defaultProperties.put("spring.cloud.polaris.discovery.zero-protection.is-need-test-connectivity", + environment.getProperty("spring.cloud.polaris.zero-protection.is-need-test-connectivity", "true")); defaultProperties.put("spring.cloud.discovery.client.health-indicator.enabled", "false"); - String warmupEnabled = environment.getProperty("spring.cloud.polaris.warmup.enabled"); - if (StringUtils.isBlank(warmupEnabled)) { - defaultProperties.put("spring.cloud.polaris.warmup.enabled", true); - } + defaultProperties.put("spring.cloud.polaris.warmup.enabled", environment.getProperty("spring.cloud.polaris.warmup.enabled", "true")); // contract defaultProperties.put("spring.cloud.polaris.contract.enabled", environment.getProperty("tsf.swagger.enabled", "true")); @@ -156,11 +155,14 @@ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringAp defaultProperties.put("spring.cloud.polaris.config.groups[0].name", "application"); defaultProperties.put("spring.cloud.polaris.config.groups[0].files[0]", tsfApplicationId + "/" + tsfGroupId + "/"); defaultProperties.put("spring.cloud.polaris.config.groups[0].files[1]", tsfNamespaceId + "/"); - defaultProperties.put("spring.cloud.polaris.config.refresh-type", "refresh_context"); + defaultProperties.put("spring.cloud.polaris.config.refresh-type", + environment.getProperty("spring.cloud.polaris.config.refresh-type", "refresh_context")); // router - defaultProperties.put("spring.cloud.polaris.router.rule-router.fail-over", "none"); - defaultProperties.put("spring.cloud.polaris.router.namespace-router.enabled", "true"); + defaultProperties.put("spring.cloud.polaris.router.rule-router.fail-over", + environment.getProperty("spring.cloud.polaris.router.rule-router.fail-over", "none")); + defaultProperties.put("spring.cloud.polaris.router.namespace-router.enabled", + environment.getProperty("spring.cloud.polaris.router.namespace-router.enabled", "true")); } MapPropertySource propertySource = new MapPropertySource("tsf-polaris-properties", defaultProperties); diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfCoreProperties.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfCoreProperties.java index 6b45344b86..c8dcbdd77b 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfCoreProperties.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfCoreProperties.java @@ -21,7 +21,7 @@ import java.util.LinkedList; import java.util.List; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -31,7 +31,7 @@ * * @author Haotian Zhang */ -@ConfigurationProperties("tsf") +@ConfigurationProperties("tsf.discovery") public class TsfCoreProperties { @Value("${tsf_app_id:}") diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfInstanceMetadataProvider.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfInstanceMetadataProvider.java index a7a1c54ee5..677509451b 100644 --- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfInstanceMetadataProvider.java +++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/config/extend/tsf/TsfInstanceMetadataProvider.java @@ -23,7 +23,6 @@ import com.tencent.cloud.common.constant.SdkVersion; import com.tencent.cloud.common.constant.WarmupCons; import com.tencent.cloud.common.spi.InstanceMetadataProvider; -import com.tencent.cloud.common.util.JacksonUtils; import com.tencent.cloud.common.util.inet.PolarisInetUtils; import com.tencent.polaris.api.utils.StringUtils; import com.tencent.polaris.metadata.core.constant.TsfMetadataConstants; @@ -75,7 +74,6 @@ public Map getMetadata() { tsfMetadata.put(WarmupCons.TSF_START_TIME, String.valueOf(System.currentTimeMillis())); tsfMetadata.put(TsfMetadataConstants.TSF_SDK_VERSION, SdkVersion.get()); - tsfMetadata.put(TsfMetadataConstants.TSF_TAGS, JacksonUtils.serialize2Json(tsfCoreProperties.getTsfTags())); String ipv4Address = PolarisInetUtils.getIpString(false); if (StringUtils.isNotBlank(ipv4Address)) { tsfMetadata.put(TsfMetadataConstants.TSF_ADDRESS_IPV4, ipv4Address); diff --git a/spring-cloud-tencent-polaris-loadbalancer/pom.xml b/spring-cloud-tencent-polaris-loadbalancer/pom.xml index 0c884bc7ef..c0e4a60613 100644 --- a/spring-cloud-tencent-polaris-loadbalancer/pom.xml +++ b/spring-cloud-tencent-polaris-loadbalancer/pom.xml @@ -22,16 +22,8 @@ - - com.tencent.polaris - polaris-discovery-api - - - com.tencent.polaris - polaris-test-common - test - + @@ -40,22 +32,33 @@ - org.springframework.boot - spring-boot-starter-test + org.springframework + spring-web test - org.mockito - mockito-inline - test - - - com.tencent.polaris - polaris-discovery-client - test + com.google.guava + guava + 32.1.3-jre + + + com.google.code.findbugs + jsr305 + + + org.codehaus.mojo + animal-sniffer-annotations + + + com.google.errorprone + error_prone_annotations + + + + diff --git a/spring-cloud-tencent-polaris-loadbalancer/src/main/java/com/tencent/cloud/polaris/loadbalancer/PolarisLoadBalancer.java b/spring-cloud-tencent-polaris-loadbalancer/src/main/java/com/tencent/cloud/polaris/loadbalancer/PolarisLoadBalancer.java index 9468322997..15da6aec87 100644 --- a/spring-cloud-tencent-polaris-loadbalancer/src/main/java/com/tencent/cloud/polaris/loadbalancer/PolarisLoadBalancer.java +++ b/spring-cloud-tencent-polaris-loadbalancer/src/main/java/com/tencent/cloud/polaris/loadbalancer/PolarisLoadBalancer.java @@ -43,7 +43,8 @@ import com.tencent.polaris.api.pojo.ServiceKey; import com.tencent.polaris.api.rpc.GetHealthyInstancesRequest; import com.tencent.polaris.api.rpc.InstancesResponse; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; + import org.springframework.util.CollectionUtils; diff --git a/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/plugin/DefaultEnhancedPluginRunner.java b/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/plugin/DefaultEnhancedPluginRunner.java index bbb97b38f5..b582fe20cb 100644 --- a/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/plugin/DefaultEnhancedPluginRunner.java +++ b/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/plugin/DefaultEnhancedPluginRunner.java @@ -20,11 +20,11 @@ import java.util.Comparator; import java.util.List; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; import com.tencent.cloud.common.metadata.MetadataContext; import com.tencent.polaris.circuitbreak.client.exception.CallAbortedException; import com.tencent.polaris.client.api.SDKContext; +import shade.polaris.com.google.common.collect.ArrayListMultimap; +import shade.polaris.com.google.common.collect.Multimap; import org.springframework.cloud.client.DefaultServiceInstance; import org.springframework.cloud.client.ServiceInstance; diff --git a/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/plugin/PolarisEnhancedPluginUtils.java b/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/plugin/PolarisEnhancedPluginUtils.java index 1b0451fcf5..cc34297451 100644 --- a/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/plugin/PolarisEnhancedPluginUtils.java +++ b/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/plugin/PolarisEnhancedPluginUtils.java @@ -47,7 +47,7 @@ import com.tencent.polaris.api.pojo.ServiceKey; import com.tencent.polaris.api.rpc.ServiceCallResult; import com.tencent.polaris.api.utils.CollectionUtils; -import org.apache.commons.lang.StringUtils; +import com.tencent.polaris.api.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/stat/config/PolarisStatProperties.java b/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/stat/config/PolarisStatProperties.java index d871b0d7f2..8e917ca81c 100644 --- a/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/stat/config/PolarisStatProperties.java +++ b/spring-cloud-tencent-rpc-enhancement/src/main/java/com/tencent/cloud/rpc/enhancement/stat/config/PolarisStatProperties.java @@ -31,7 +31,7 @@ public class PolarisStatProperties { /** * If state reporter enabled. */ - private boolean enabled = true; + private boolean enabled = false; /** * Path for prometheus to pull. diff --git a/spring-cloud-tencent-rpc-enhancement/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-cloud-tencent-rpc-enhancement/src/main/resources/META-INF/additional-spring-configuration-metadata.json index da7f0e8f61..e0af74e670 100644 --- a/spring-cloud-tencent-rpc-enhancement/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-cloud-tencent-rpc-enhancement/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -33,7 +33,7 @@ { "name": "spring.cloud.polaris.stat.enabled", "type": "java.lang.Boolean", - "defaultValue": true, + "defaultValue": false, "description": "Enable polaris stat reporter or not." }, { From 167004023e152a5152a81278205937b8da31c34d Mon Sep 17 00:00:00 2001 From: fishtailfu Date: Tue, 13 May 2025 19:49:26 +0800 Subject: [PATCH 2/7] feat:use polaris-all for shading third-party dependencies. --- spring-cloud-tencent-rpc-enhancement/pom.xml | 41 ++------------------ 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/spring-cloud-tencent-rpc-enhancement/pom.xml b/spring-cloud-tencent-rpc-enhancement/pom.xml index 6f15acdf3f..e255321009 100644 --- a/spring-cloud-tencent-rpc-enhancement/pom.xml +++ b/spring-cloud-tencent-rpc-enhancement/pom.xml @@ -21,19 +21,6 @@ - - - com.tencent.polaris - stat-prometheus - - - junit - junit - - - - - org.springframework.boot spring-boot-starter-aop @@ -42,6 +29,10 @@ org.springframework.boot spring-boot-starter-logging + + org.springframework.boot + spring-boot-starter + @@ -85,30 +76,6 @@ spring-boot-starter-web true - - - com.tencent.polaris - polaris-test-common - test - - - - org.springframework.boot - spring-boot-starter-test - test - - - - io.projectreactor - reactor-test - test - - - - org.mockito - mockito-inline - test - From a1bb172d93e03a21c0946e5aef47e0531a8830c8 Mon Sep 17 00:00:00 2001 From: fishtailfu Date: Tue, 13 May 2025 20:47:48 +0800 Subject: [PATCH 3/7] feat:use polaris-all for shading third-party dependencies. --- spring-cloud-tencent-dependencies/pom.xml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index f5c660a3f9..1dc8ddebe6 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -241,27 +241,6 @@ ${revision} - - - - - - - - - - - - - - - - - - - - - ch.qos.logback logback-core From 11d1610e073212d7cbd73d4532446b9ce9e99de6 Mon Sep 17 00:00:00 2001 From: fishtailfu Date: Tue, 13 May 2025 21:42:14 +0800 Subject: [PATCH 4/7] feat:use polaris-all for shading third-party dependencies. --- spring-cloud-tencent-dependencies/pom.xml | 53 ++++++------------- .../pom.xml | 29 ---------- 2 files changed, 17 insertions(+), 65 deletions(-) diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index 1dc8ddebe6..16420197d4 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -242,15 +242,23 @@ - ch.qos.logback - logback-core - ${logback.version} - - - - ch.qos.logback - logback-classic - ${logback.version} + com.google.guava + guava + ${guava.version} + + + jsr305 + com.google.code.findbugs + + + animal-sniffer-annotations + org.codehaus.mojo + + + error_prone_annotations + com.google.errorprone + + @@ -272,9 +280,6 @@ ${byte-buddy.version} - - - org.yaml snakeyaml @@ -287,30 +292,6 @@ ${gson.version} - - org.hdrhistogram - HdrHistogram - ${HdrHistogram.version} - - - - org.hibernate.validator - hibernate-validator - ${hibernate-validator.version} - - - - com.google.code.findbugs - jsr305 - ${jsr305.version} - - - - org.glassfish - jakarta.el - ${jakarta.el.version} - - org.mockito mockito-inline diff --git a/spring-cloud-tencent-polaris-loadbalancer/pom.xml b/spring-cloud-tencent-polaris-loadbalancer/pom.xml index c0e4a60613..dab0ef6c7d 100644 --- a/spring-cloud-tencent-polaris-loadbalancer/pom.xml +++ b/spring-cloud-tencent-polaris-loadbalancer/pom.xml @@ -14,17 +14,10 @@ Spring Cloud Tencent Polaris LoadBalancer - com.tencent.cloud spring-cloud-tencent-rpc-enhancement - - - - - - org.springframework.cloud @@ -37,28 +30,6 @@ test - - com.google.guava - guava - 32.1.3-jre - - - com.google.code.findbugs - jsr305 - - - org.codehaus.mojo - animal-sniffer-annotations - - - com.google.errorprone - error_prone_annotations - - - - - - From 8cd9b3696759263aa45ae34bd69fb2f1f7a42e92 Mon Sep 17 00:00:00 2001 From: fishtail Date: Tue, 13 May 2025 22:03:17 +0800 Subject: [PATCH 5/7] feat:use polaris-all for shading third-party dependencies. --- .../pom.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spring-cloud-tencent-polaris-loadbalancer/pom.xml b/spring-cloud-tencent-polaris-loadbalancer/pom.xml index dab0ef6c7d..165eeb3288 100644 --- a/spring-cloud-tencent-polaris-loadbalancer/pom.xml +++ b/spring-cloud-tencent-polaris-loadbalancer/pom.xml @@ -30,6 +30,25 @@ test + + com.google.guava + guava + 32.1.3-jre + + + com.google.code.findbugs + jsr305 + + + org.codehaus.mojo + animal-sniffer-annotations + + + com.google.errorprone + error_prone_annotations + + + From 0c6331c03be39c0036a75b312375a0e48617c448 Mon Sep 17 00:00:00 2001 From: Haotian Zhang <928016560@qq.com> Date: Wed, 14 May 2025 11:45:19 +0800 Subject: [PATCH 6/7] feat:use polaris-all for shading third-party dependencies. --- .../PolarisLoadBalancerCompositeRule.java | 2 +- spring-cloud-tencent-dependencies/pom.xml | 62 ++++++++++--------- .../pom.xml | 13 ++-- 3 files changed, 41 insertions(+), 36 deletions(-) diff --git a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/PolarisLoadBalancerCompositeRule.java b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/PolarisLoadBalancerCompositeRule.java index dd7c26ae03..0460f56646 100644 --- a/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/PolarisLoadBalancerCompositeRule.java +++ b/spring-cloud-starter-tencent-polaris-router/src/main/java/com/tencent/cloud/polaris/router/PolarisLoadBalancerCompositeRule.java @@ -51,7 +51,7 @@ import com.tencent.polaris.router.api.core.RouterAPI; import com.tencent.polaris.router.api.rpc.ProcessRoutersRequest; import com.tencent.polaris.router.api.rpc.ProcessRoutersResponse; -import org.yaml.snakeyaml.util.UriEncoder; +import shade.polaris.org.yaml.snakeyaml.util.UriEncoder; import org.springframework.http.HttpRequest; import org.springframework.util.CollectionUtils; diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index 16420197d4..2c57094be5 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -83,11 +83,6 @@ 2.15.3 2.0.2 1.33 - 2.9.1 - 2.1.10 - 6.2.5.Final - 3.0.2 - 3.0.4 3.3.0 @@ -106,14 +101,7 @@ import - - polaris-dependencies - com.tencent.polaris - ${polaris.version} - pom - import - - + com.tencent.cloud spring-cloud-tencent-commons @@ -199,12 +187,6 @@ ${revision} - - com.tencent.cloud - spring-cloud-tencent-featureenv-plugin - ${revision} - - com.tencent.cloud spring-cloud-starter-tencent-gateway-plugin @@ -263,17 +245,16 @@ org.springdoc - springdoc-openapi-ui + springdoc-openapi-webflux-ui ${springdoc.version} org.springdoc - springdoc-openapi-webflux-ui + springdoc-openapi-ui ${springdoc.version} - net.bytebuddy byte-buddy @@ -286,12 +267,6 @@ ${snakeyaml.version} - - com.google.code.gson - gson - ${gson.version} - - org.mockito mockito-inline @@ -313,6 +288,37 @@ test + + + polaris-all + com.tencent.polaris + ${polaris.version} + + + + polaris-threadlocal + com.tencent.polaris + ${polaris.version} + + + + com.tencent.polaris + connector-nacos + ${polaris.version} + + + + com.tencent.polaris + polaris-test-common + ${polaris.version} + test + + + com.tencent.polaris + polaris-test-mock-discovery + ${polaris.version} + test + diff --git a/spring-cloud-tencent-polaris-loadbalancer/pom.xml b/spring-cloud-tencent-polaris-loadbalancer/pom.xml index 165eeb3288..da64c25d62 100644 --- a/spring-cloud-tencent-polaris-loadbalancer/pom.xml +++ b/spring-cloud-tencent-polaris-loadbalancer/pom.xml @@ -24,12 +24,6 @@ spring-cloud-starter-netflix-ribbon - - org.springframework - spring-web - test - - com.google.guava guava @@ -49,6 +43,11 @@ - + + org.springframework + spring-web + test + + From 9ec09cec17ad6216303aa1b44a81bcb98d9fecdb Mon Sep 17 00:00:00 2001 From: fishtailfu Date: Wed, 14 May 2025 12:05:16 +0800 Subject: [PATCH 7/7] feat:use polaris-all for shading third-party dependencies. --- spring-cloud-starter-tencent-polaris-discovery/pom.xml | 6 ------ spring-cloud-starter-tencent-polaris-router/pom.xml | 10 +++++----- .../pom.xml | 5 +---- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/spring-cloud-starter-tencent-polaris-discovery/pom.xml b/spring-cloud-starter-tencent-polaris-discovery/pom.xml index d282dc512e..c2c532ec6f 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/pom.xml +++ b/spring-cloud-starter-tencent-polaris-discovery/pom.xml @@ -23,12 +23,6 @@ com.tencent.cloud spring-cloud-tencent-rpc-enhancement - - - spring-security-crypto - org.springframework.security - - diff --git a/spring-cloud-starter-tencent-polaris-router/pom.xml b/spring-cloud-starter-tencent-polaris-router/pom.xml index 8d108d6c1d..ce3dbd6ad2 100644 --- a/spring-cloud-starter-tencent-polaris-router/pom.xml +++ b/spring-cloud-starter-tencent-polaris-router/pom.xml @@ -15,6 +15,11 @@ + + com.tencent.cloud + spring-cloud-tencent-polaris-loadbalancer + + com.tencent.cloud spring-cloud-starter-tencent-metadata-transfer @@ -75,11 +80,6 @@ true - - com.tencent.cloud - spring-cloud-tencent-polaris-loadbalancer - - org.springframework.retry spring-retry diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/pom.xml b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/pom.xml index 9bc116cabf..9b3cc46c47 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/pom.xml +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-starter-tencent-discovery-adapter-plugin/pom.xml @@ -26,9 +26,6 @@ 2.2.9.RELEASE true - - com.tencent.cloud - spring-cloud-tencent-polaris-loadbalancer - +