From 920cb430253ff274f9dc0fddde6ae240a7380e87 Mon Sep 17 00:00:00 2001 From: Haotian Zhang Date: Wed, 18 Oct 2023 20:10:42 +0800 Subject: [PATCH] feat:optimize examples. (#1187) --- CHANGELOG.md | 1 + spring-cloud-starter-tencent-all/pom.xml | 12 -- .../src/main/resources/bootstrap.yml | 25 ++- .../README-zh.md | 66 ------- .../polaris-circuitbreaker-example/README.md | 66 ------- .../pom.xml | 56 ------ .../circuitbreaker/example/ServiceB.java | 34 ---- .../example/ServiceBController.java | 55 ------ .../src/main/resources/bootstrap.yml | 13 -- .../pom.xml | 56 ------ .../ciruitbreaker/example/ServiceB2.java | 35 ---- .../example/ServiceBController.java | 98 ---------- .../src/main/resources/bootstrap.yml | 13 -- .../pom.xml | 82 -------- .../feign/example/ServiceAController.java | 59 ------ .../feign/example/ServiceAFeign.java | 38 ---- .../src/main/resources/bootstrap.yml | 30 --- .../pom.xml | 92 --------- .../example/GatewayScgApplication.java | 35 ---- .../src/main/resources/bootstrap.yml | 65 ------- .../pom.xml | 77 -------- .../example/ServiceAController.java | 74 -------- .../example/ServiceAResTemplate.java | 71 ------- .../src/main/resources/bootstrap.yml | 26 --- .../pom.xml | 77 -------- .../webclient/example/ServiceAController.java | 59 ------ .../webclient/example/ServiceAWebClient.java | 45 ----- .../src/main/resources/bootstrap.yml | 26 --- .../polaris-circuitbreaker-example/pom.xml | 25 --- .../polaris-config-example/README-zh.md | 77 -------- .../polaris-config-ui.png | Bin 116372 -> 0 bytes .../polaris-config-example/pom.xml | 64 ------- .../config/example/ConfigController.java | 52 ----- .../cloud/polaris/config/example/Person.java | 84 --------- .../example/PersonConfigChangeListener.java | 66 ------- .../PolarisConfigExampleApplication.java | 34 ---- .../src/main/resources/bootstrap.yml | 22 --- .../polaris-discovery-example/README-zh.md | 67 ------- .../polaris-discovery-example/README.md | 81 -------- .../discovery-callee-service/pom.xml | 76 -------- .../service/callee/CustomMetadata.java | 47 ----- .../callee/DiscoveryCalleeController.java | 69 ------- .../callee/DiscoveryCalleeService.java | 34 ---- .../src/main/resources/bootstrap.yml | 53 ------ .../discovery-caller-service/pom.xml | 80 -------- .../caller/DiscoveryCalleeService.java | 40 ---- .../caller/DiscoveryCallerController.java | 70 ------- .../caller/DiscoveryCallerService.java | 47 ----- .../src/main/resources/bootstrap.yml | 68 ------- .../polaris-discovery-example/pom.xml | 33 ---- .../polaris-gateway-example/README-zh.md | 80 -------- .../polaris-gateway-example/README.md | 81 -------- .../gateway-callee-service/pom.xml | 32 ---- .../callee/GatewayCalleeApplication.java | 34 ---- .../callee/GatewayCalleeController.java | 72 ------- .../src/main/resources/bootstrap.yml | 14 -- .../gateway-callee-service2/pom.xml | 32 ---- .../callee/GatewayCalleeApplication2.java | 34 ---- .../callee/GatewayCalleeController.java | 72 ------- .../src/main/resources/bootstrap.yml | 14 -- .../gateway-scg-service/pom.xml | 52 ----- .../example/scg/GatewayScgApplication.java | 34 ---- .../src/main/resources/bootstrap.yml | 68 ------- .../polaris-gateway-example/pom.xml | 38 ---- .../polaris-ratelimit-example/README-zh.md | 59 ------ .../polaris-ratelimit-example/README.md | 66 ------- .../polaris-ratelimit-example/pom.xml | 20 -- .../ratelimit-callee-service/pom.xml | 50 ----- .../service/callee/BusinessController.java | 177 ------------------ .../callee/RateLimitCalleeService.java | 51 ----- .../src/main/resources/bootstrap.yml | 26 --- .../polaris-router-example/pom.xml | 21 --- .../router-callee-service1/pom.xml | 60 ------ .../example/RouterCalleeApplication1.java | 35 ---- .../example/RouterCalleeController.java | 53 ------ .../cloud/polaris/router/example/User.java | 53 ------ .../src/main/resources/bootstrap.yml | 14 -- .../router-callee-service2/pom.xml | 60 ------ .../example/RouterCalleeApplication2.java | 35 ---- .../example/RouterCalleeController.java | 54 ------ .../cloud/polaris/router/example/User.java | 53 ------ .../src/main/resources/bootstrap.yml | 14 -- .../router-caller-service/pom.xml | 83 -------- .../CustomSpringWebRouterLabelResolver.java | 51 ----- .../router/example/RouterCalleeService.java | 36 ---- .../example/RouterCallerApplication.java | 48 ----- .../example/RouterCallerController.java | 76 -------- .../cloud/polaris/router/example/User.java | 45 ----- .../src/main/resources/bootstrap.yml | 28 --- spring-cloud-tencent-examples/pom.xml | 6 - .../quickstart-callee-service-a/pom.xml | 5 + .../callee/QuickstartCalleeController.java | 38 +++- .../config}/CustomConfigChangeListener.java | 9 +- .../{ => config}/DataSourceProperties.java | 2 +- .../ratelimit}/CustomLabelResolver.java | 20 +- .../src/main/resources/bootstrap.yml | 22 +++ .../src/main/resources/reject-tips.html | 0 .../quickstart-callee-service-b/pom.xml | 5 + .../callee/QuickstartCalleeController.java | 73 +++++++- .../config}/CustomConfigChangeListener.java | 8 +- .../{ => config}/DataSourceProperties.java | 6 +- .../CustomLabelResolverReactive.java | 20 +- ...JsonPolarisRateLimiterLimitedFallback.java | 2 +- .../src/main/resources/bootstrap.yml | 21 +++ .../quickstart-caller-service/pom.xml | 15 ++ .../caller/CustomMetadataProvider.java} | 15 +- .../caller/QuickstartCalleeService.java | 8 - .../QuickstartCalleeServiceFallback.java | 5 - .../caller/QuickstartCallerApplication.java | 40 ++++ .../caller/QuickstartCallerController.java | 22 ++- .../CircuitBreakerController.java | 136 ++++++++++++++ ...ircuitBreakerQuickstartCalleeService.java} | 14 +- ...eakerQuickstartCalleeServiceFallback.java} | 8 +- ...rQuickstartCalleeServiceWithFallback.java} | 17 +- .../circuitbreaker}/CustomFallback.java | 2 +- .../router}/CustomRouterLabelResolver.java | 6 +- .../src/main/resources/bootstrap.yml | 7 +- .../gateway}/FallbackController.java | 4 +- .../src/main/resources/bootstrap.yml | 26 +++ 119 files changed, 499 insertions(+), 4563 deletions(-) delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/README-zh.md delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/README.md delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/java/com/tencent/cloud/polaris/circuitbreaker/example/ServiceB.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/java/com/tencent/cloud/polaris/circuitbreaker/example/ServiceBController.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/java/com/tencent/cloud/polaris/ciruitbreaker/example/ServiceB2.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/java/com/tencent/cloud/polaris/ciruitbreaker/example/ServiceBController.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ServiceAController.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ServiceAFeign.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/gateway/example/GatewayScgApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/ServiceAController.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/ServiceAResTemplate.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/webclient/example/ServiceAController.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/webclient/example/ServiceAWebClient.java delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-circuitbreaker-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-config-example/README-zh.md delete mode 100644 spring-cloud-tencent-examples/polaris-config-example/polaris-config-ui.png delete mode 100644 spring-cloud-tencent-examples/polaris-config-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/ConfigController.java delete mode 100644 spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/Person.java delete mode 100644 spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/PersonConfigChangeListener.java delete mode 100644 spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/PolarisConfigExampleApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-config-example/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/README-zh.md delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/README.md delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/CustomMetadata.java delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/DiscoveryCalleeController.java delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/DiscoveryCalleeService.java delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCalleeService.java delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCallerController.java delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCallerService.java delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-discovery-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/README-zh.md delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/README.md delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeController.java delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeApplication2.java delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeController.java delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/src/main/java/com/tencent/cloud/polaris/gateway/example/scg/GatewayScgApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-gateway-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-ratelimit-example/README-zh.md delete mode 100644 spring-cloud-tencent-examples/polaris-ratelimit-example/README.md delete mode 100644 spring-cloud-tencent-examples/polaris-ratelimit-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/BusinessController.java delete mode 100644 spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/RateLimitCalleeService.java delete mode 100644 spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeApplication1.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/User.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeApplication2.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/User.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/resources/bootstrap.yml delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-caller-service/pom.xml delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/CustomSpringWebRouterLabelResolver.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeService.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCallerApplication.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCallerController.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/User.java delete mode 100644 spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/resources/bootstrap.yml rename spring-cloud-tencent-examples/quickstart-example/{quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee => quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config}/CustomConfigChangeListener.java (84%) rename spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/{ => config}/DataSourceProperties.java (96%) rename spring-cloud-tencent-examples/{polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee => quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit}/CustomLabelResolver.java (68%) rename spring-cloud-tencent-examples/{polaris-ratelimit-example/ratelimit-callee-service => quickstart-example/quickstart-callee-service-a}/src/main/resources/reject-tips.html (100%) rename spring-cloud-tencent-examples/quickstart-example/{quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee => quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config}/CustomConfigChangeListener.java (84%) rename spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/{ => config}/DataSourceProperties.java (92%) rename spring-cloud-tencent-examples/{polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee => quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit}/CustomLabelResolverReactive.java (68%) rename spring-cloud-tencent-examples/{polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee => quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit}/JsonPolarisRateLimiterLimitedFallback.java (95%) rename spring-cloud-tencent-examples/{polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCalleeServiceFallback.java => quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java} (75%) create mode 100644 spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java rename spring-cloud-tencent-examples/{polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderB.java => quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java} (74%) rename spring-cloud-tencent-examples/{polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderBFallback.java => quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java} (76%) rename spring-cloud-tencent-examples/{polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderBWithFallback.java => quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java} (66%) rename spring-cloud-tencent-examples/{polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example => quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker}/CustomFallback.java (95%) rename spring-cloud-tencent-examples/{polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example => quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/router}/CustomRouterLabelResolver.java (89%) rename spring-cloud-tencent-examples/{polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/gateway/example => quickstart-example/quickstart-gateway-service/src/main/java/com/tencent/cloud/quickstart/gateway}/FallbackController.java (88%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03e9d4887..1d412e2b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,3 +16,4 @@ - [feat: add metadata transfer for http header via spring.cloud.tencent.metadata.headers.](https://github.com/Tencent/spring-cloud-tencent/pull/1175) - [fix:remove bcprov-jdk15on dependency.](https://github.com/Tencent/spring-cloud-tencent/pull/1179) - [feat:support configuration encryption.](https://github.com/Tencent/spring-cloud-tencent/pull/1183) +- [feat:optimize examples.](https://github.com/Tencent/spring-cloud-tencent/pull/1187) diff --git a/spring-cloud-starter-tencent-all/pom.xml b/spring-cloud-starter-tencent-all/pom.xml index fc6470e9a..50908dfa5 100644 --- a/spring-cloud-starter-tencent-all/pom.xml +++ b/spring-cloud-starter-tencent-all/pom.xml @@ -49,18 +49,6 @@ com.tencent.cloud spring-cloud-starter-tencent-polaris-contract - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - - - org.springframework.boot - spring-boot-starter-actuator - diff --git a/spring-cloud-tencent-examples/multiple-discovery-example/multiple-discovery-nacos-example/nacos-discovery-caller/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/multiple-discovery-example/multiple-discovery-nacos-example/nacos-discovery-caller/src/main/resources/bootstrap.yml index 72ecca940..187df8952 100644 --- a/spring-cloud-tencent-examples/multiple-discovery-example/multiple-discovery-nacos-example/nacos-discovery-caller/src/main/resources/bootstrap.yml +++ b/spring-cloud-tencent-examples/multiple-discovery-example/multiple-discovery-nacos-example/nacos-discovery-caller/src/main/resources/bootstrap.yml @@ -15,7 +15,30 @@ spring: nacos: discovery: server-addr: 127.0.0.1:8848 - +# consul: +# port: 8500 +# host: 127.0.0.1 +# enabled: true +# discovery: +# enabled: true +# register: true +# health-check-path: /actuator/health +# health-check-interval: 10s +# instance-id: ${spring.application.name}:${server.port} +# service-name: ${spring.application.name} +# ip-address: localhost +# prefer-ip-address: true +# nacos: +# enabled: true +# password: nacos +# username: nacos +# context-path: /nacos +# discovery: +# enabled: true +# register-enabled: true +# group: polaris +# server-addr: 127.0.0.1:8848 +# cluster-name: polaris feign: circuitbreaker: enabled: true diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/README-zh.md b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/README-zh.md deleted file mode 100644 index 30679375a..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/README-zh.md +++ /dev/null @@ -1,66 +0,0 @@ -# Spring Cloud Polaris Circuitbreaker example - -## 样例简介 - -本样例将介绍如何在Spring Cloud项目中使用```spring-cloud-starter-tencent-polaris-circuitbreaker```以使用其各项功能。 - -本样例包括被调方```polaris-circuitbreaker-callee-service```、```polaris-circuitbreaker-callee-service2```和主调方```polaris-circuitbreaker-feign-example```、```polaris-circuitbreaker-gateway-example```、```polaris-circuitbreaker-webclient-example```。 - -## 使用说明 - -### 修改配置 - -配置如下所示。其中,${ip}和${port}为Polaris后端服务的IP地址与端口号。 - -```yaml -spring: - application: - name: ${application.name} - cloud: - polaris: - address: ${ip}:${port} -``` - -### 启动样例 - -#### 启动Polaris后端服务 - -参考[Polaris Getting Started](https://github.com/PolarisMesh/polaris#getting-started)。 - -#### 启动被调应用 - -分别启动```polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service```、```polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2``` - - -#### 启动主调应用 - -##### 启动Feign并验证 - -启动```polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example```。 - -发送请求`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromPolaris'`, 验证熔断和Polaris-server远程拉取降级。 - -发送请求`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromCode'`, 验证熔断和代码降级。 - -##### 启动RestTemplate并验证 - -启动```polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example```。 - -发送请求`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromPolaris'`, 验证熔断和Polaris-server远程拉取降级。 - -发送请求`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromCode'`, 验证熔断和代码降级。 - -##### 启动WebClient并验证 - -启动```polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example```。 - -发送请求`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo'`, 验证熔断和代码降级。 - -##### 启动SCG并验证 - -启动```polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example```。 - -发送请求`curl --location --request GET 'http://127.0.0.1:48080/polaris-circuitbreaker-callee-service/example/service/b/info'`, 验证熔断和代码降级。 - -修改```polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/resources/bootstrap.yml```。删除本地fallback方法并重启,验证熔断和Polaris-server远程拉取降级。 - diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/README.md b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/README.md deleted file mode 100644 index 0c297ef02..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# Spring Cloud Polaris Circuitbreaker example - -## Example Introduction - -This example shows how to use```spring-cloud-starter-tencent-polaris-circuitbreaker```in Spring Cloud project for its features. - -This example contains callee-service```polaris-circuitbreaker-callee-service```、```polaris-circuitbreaker-callee-service2```and caller-service```polaris-circuitbreaker-feign-example```、```polaris-circuitbreaker-gateway-example```、```polaris-circuitbreaker-webclient-example```. - -## Instruction - -### Configuration - -The configuration is as the following shows. ${ip} and ${port} are Polaris backend IP address and port number. - -```yaml -spring: - application: - name: ${application.name} - cloud: - polaris: - address: ${ip}:${port} -``` - -### Launching Example - -#### Launching Polaris Backend Service - -Reference to [Polaris Getting Started](https://github.com/PolarisMesh/polaris#getting-started) - -#### Launching callee service - -Launching```polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service```、```polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2``` - - -#### Launching caller service - -##### Launching Feign and Verify - -Launching```polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example```. - -Sending request`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromPolaris'`, Verify circuit breaker and fallback from Polaris-server. - -Sending request`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromCode'`, Verify circuit breaker and fallback from code. - -##### Launching RestTemplate and Verify - -Launching```polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example```. - -Sending request`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromPolaris'`, Verify circuit breaker and fallback from Polaris-server. - -Sending request`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromCode'`, Verify circuit breaker and fallback from code. - -##### Launching WebClient and Verify - -Launching```polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example```。 - -Sending request`curl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo'`, Verify circuit breaker and fallback from code. - -##### Launching SCG and Verify - -Launching```polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example```。 - -Sending request`curl --location --request GET 'http://127.0.0.1:48080/polaris-circuitbreaker-callee-service/example/service/b/info'`, Verify circuit breaker and fallback from code. - -Changing```polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/resources/bootstrap.yml```, delete local fallback and restart, Verify circuit breaker and fallback from Polaris-server. - diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/pom.xml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/pom.xml deleted file mode 100644 index e1ee856b3..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - polaris-circuitbreaker-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-circuitbreaker-callee-service - Polaris Circuit Breaker Callee Example - - - - org.springframework.boot - spring-boot-starter-webflux - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - - - - 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/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/java/com/tencent/cloud/polaris/circuitbreaker/example/ServiceB.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/java/com/tencent/cloud/polaris/circuitbreaker/example/ServiceB.java deleted file mode 100644 index c8c32bf24..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/java/com/tencent/cloud/polaris/circuitbreaker/example/ServiceB.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Circuit breaker example callee application. - * - * @author Haotian Zhang - */ -@SpringBootApplication -public class ServiceB { - - public static void main(String[] args) { - SpringApplication.run(ServiceB.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/java/com/tencent/cloud/polaris/circuitbreaker/example/ServiceBController.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/java/com/tencent/cloud/polaris/circuitbreaker/example/ServiceBController.java deleted file mode 100644 index 8628db06a..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/java/com/tencent/cloud/polaris/circuitbreaker/example/ServiceBController.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.example; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * Service B Controller. - * - * @author Haotian Zhang - */ -@RestController -@RequestMapping("/example/service/b") -public class ServiceBController { - - /** - * Get service information. - * - * @return service information - */ - @GetMapping("/info") - public String info() { - return "hello world ! I'm a service B1"; - } - - @GetMapping("/health") - public String health() { - System.out.println("health check: 200 instance"); - return "hello world ! I'm a service B1"; - } - - @GetMapping("/health-svc") - public String healthsvc() { - System.out.println("health-svc check: 200 instance"); - return "hello world ! I'm a service B1"; - } -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/resources/bootstrap.yml deleted file mode 100644 index ffed6a22c..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,13 +0,0 @@ -server: - port: 48081 -spring: - application: - name: polaris-circuitbreaker-callee-service - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - stat: - enabled: true - port: 28082 diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/pom.xml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/pom.xml deleted file mode 100644 index 152aeef96..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - polaris-circuitbreaker-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-circuitbreaker-callee-service2 - Polaris Circuit Breaker Callee Example 2 - - - - org.springframework.boot - spring-boot-starter-webflux - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - - - - 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/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/java/com/tencent/cloud/polaris/ciruitbreaker/example/ServiceB2.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/java/com/tencent/cloud/polaris/ciruitbreaker/example/ServiceB2.java deleted file mode 100644 index fb6bdc687..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/java/com/tencent/cloud/polaris/ciruitbreaker/example/ServiceB2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.ciruitbreaker.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Circuit breaker example callee application. - * - * @author Haotian Zhang - */ -@SpringBootApplication -public class ServiceB2 { - - public static void main(String[] args) { - SpringApplication.run(ServiceB2.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/java/com/tencent/cloud/polaris/ciruitbreaker/example/ServiceBController.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/java/com/tencent/cloud/polaris/ciruitbreaker/example/ServiceBController.java deleted file mode 100644 index 2d5287c3a..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/java/com/tencent/cloud/polaris/ciruitbreaker/example/ServiceBController.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.ciruitbreaker.example; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; - -/** - * Service B Controller. - * - * @author Haotian Zhang - */ -@RestController -@RequestMapping("/example/service/b") -public class ServiceBController { - - private static final Logger LOG = LoggerFactory.getLogger(ServiceBController.class); - - private boolean ifBadGateway = true; - - private boolean ifDelay = true; - - @GetMapping("/setBadGateway") - public void setBadGateway(@RequestParam boolean param) { - if (param) { - LOG.info("info is set to return HttpStatus.BAD_GATEWAY."); - } - else { - LOG.info("info is set to return HttpStatus.OK."); - } - this.ifBadGateway = param; - } - - @GetMapping("/setDelay") - public void setDelay(@RequestParam boolean param) { - if (param) { - LOG.info("info is set to delay 100ms."); - } - else { - LOG.info("info is set to no delay."); - } - this.ifDelay = param; - } - - /** - * Get service information. - * - * @return service information - */ - @GetMapping("/info") - public ResponseEntity info() throws InterruptedException { - if (ifBadGateway) { - return new ResponseEntity<>("failed for call my service", HttpStatus.BAD_GATEWAY); - } - if (ifDelay) { - Thread.sleep(100); - } - return new ResponseEntity<>("hello world ! I'm a service B2", HttpStatus.OK); - } - - @GetMapping("/health") - @ResponseStatus(value = HttpStatus.BAD_GATEWAY, reason = "failed for call my service") - public String health() { - System.out.println("health check: 502 instance"); - return "hello world ! I'm a service B1"; - } - - @GetMapping("/health-svc") - @ResponseStatus(value = HttpStatus.BAD_GATEWAY, reason = "failed for call my service") - public String healthsvc() { - System.out.println("health-svc check: 502 instance"); - return "hello world ! I'm a service B1"; - } -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/resources/bootstrap.yml deleted file mode 100644 index 4909643f7..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,13 +0,0 @@ -server: - port: 48082 -spring: - application: - name: polaris-circuitbreaker-callee-service - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - stat: - enabled: true - port: 28083 diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/pom.xml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/pom.xml deleted file mode 100644 index a45ce9336..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - polaris-circuitbreaker-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-circuitbreaker-feign-example - Polaris Circuit Breaker Feign Example - - - - org.springframework.boot - spring-boot-starter-web - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - - org.springframework.cloud - spring-cloud-starter-loadbalancer - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-circuitbreaker - - - - org.springframework.cloud - spring-cloud-starter-bootstrap - - - - org.springframework.boot - 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/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ServiceAController.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ServiceAController.java deleted file mode 100644 index 30aa94c49..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ServiceAController.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.feign.example; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * Circuit breaker example caller controller. - * - * @author sean yu - */ -@RestController -@RequestMapping("/example/service/a") -public class ServiceAController { - - @Autowired - private ProviderB polarisServiceB; - - @Autowired - private ProviderBWithFallback providerBWithFallback; - - /** - * Get info of Service B by Feign. - * @return info of Service B - */ - @GetMapping("/getBServiceInfo/fallbackFromCode") - public String getBServiceInfoFallbackFromCode() { - return providerBWithFallback.info(); - } - - /** - * Get info of Service B by Feign. - * @return info of Service B - */ - @GetMapping("/getBServiceInfo/fallbackFromPolaris") - public String getBServiceInfoFallbackFromPolaris() { - return polarisServiceB.info(); - } - -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ServiceAFeign.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ServiceAFeign.java deleted file mode 100644 index f6a012bb0..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ServiceAFeign.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.feign.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * Circuit breaker example caller application. - * - * @author sean yu - */ -@SpringBootApplication -@EnableFeignClients -public class ServiceAFeign { - - public static void main(String[] args) { - SpringApplication.run(ServiceAFeign.class, args); - } - -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/resources/bootstrap.yml deleted file mode 100644 index 0afe7375d..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,30 +0,0 @@ -server: - port: 48080 -spring: - application: - name: polaris-circuitbreaker-feign-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - loadbalancer: - enabled: true - circuitbreaker: - enabled: true - -feign: - circuitbreaker: - enabled: true - -logging: - level: - root: info - com.tencent.cloud: debug - -management: - endpoints: - web: - exposure: - include: - - polaris-circuit-breaker diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/pom.xml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/pom.xml deleted file mode 100644 index 833f2e51e..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/pom.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - polaris-circuitbreaker-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-circuitbreaker-gateway-example - Polaris Circuit Breaker Gateway Example - - - - spring-cloud-starter-tencent-polaris-discovery - com.tencent.cloud - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-circuitbreaker - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-router - - - - com.tencent.cloud - spring-cloud-tencent-gateway-plugin - - - - com.tencent.cloud - spring-cloud-starter-tencent-metadata-transfer - - - - com.tencent.cloud - spring-cloud-tencent-featureenv-plugin - - - - org.springframework.cloud - spring-cloud-starter-gateway - - - - org.springframework.cloud - spring-cloud-starter-bootstrap - - - - org.springframework.boot - 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/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/gateway/example/GatewayScgApplication.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/gateway/example/GatewayScgApplication.java deleted file mode 100644 index ea042b2f9..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/gateway/example/GatewayScgApplication.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.gateway.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * SCG application. - * - * @author sean yu - */ -@SpringBootApplication -public class GatewayScgApplication { - - public static void main(String[] args) { - SpringApplication.run(GatewayScgApplication.class, args); - } - -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/resources/bootstrap.yml deleted file mode 100644 index 1c946649c..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,65 +0,0 @@ -server: - session-timeout: 1800 - port: 48080 -spring: - application: - name: GatewayScgService - 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: CircuitBreaker - args: - # statusCodes 缺省时会自动识别 "5**" 为错误 - # statusCodes: '''404,5**''' - # fallbackUri 缺省时会在熔断触发后拉取 plaris server 配置的降级作为 response - fallbackUri: '''forward:/polaris-fallback''' -# routes: -# - id: polaris-circuitbreaker-callee-service -# uri: lb://polaris-circuitbreaker-callee-service -# predicates: -# - Path=/polaris-circuitbreaker-callee-service/** -# filters: -# - StripPrefix=1 -# - name: CircuitBreaker -# args: -# statusCodes: 502 -# fallbackUri: forward:/polaris-fallback -logging: - level: - root: info - com.tencent.polaris.discovery.client.flow.RegisterFlow: off - com.tencent.polaris.plugins.registry: off - com.tencent.cloud: debug - -management: - endpoints: - web: - exposure: - include: - - polaris-circuit-breaker diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/pom.xml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/pom.xml deleted file mode 100644 index 942c7587f..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - polaris-circuitbreaker-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-circuitbreaker-resttemplate-example - Polaris Circuit Breaker RestTemplate Example - - - - org.springframework.boot - spring-boot-starter-web - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - org.springframework.cloud - spring-cloud-starter-loadbalancer - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-circuitbreaker - - - - org.springframework.cloud - spring-cloud-starter-bootstrap - - - - org.springframework.boot - 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/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/ServiceAController.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/ServiceAController.java deleted file mode 100644 index d17744ce3..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/ServiceAController.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.resttemplate.example; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.cloud.client.circuitbreaker.CircuitBreakerFactory; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.RestTemplate; - -/** - * Circuit breaker example caller controller. - * - * @author sean yu - */ -@RestController -@RequestMapping("/example/service/a") -public class ServiceAController { - - @Autowired - @Qualifier("defaultRestTemplate") - private RestTemplate defaultRestTemplate; - - @Autowired - @Qualifier("restTemplateFallbackFromPolaris") - private RestTemplate restTemplateFallbackFromPolaris; - - @Autowired - @Qualifier("restTemplateFallbackFromCode") - private RestTemplate restTemplateFallbackFromCode; - - @Autowired - private CircuitBreakerFactory circuitBreakerFactory; - - @GetMapping("/getBServiceInfo") - public String getBServiceInfo() { - return circuitBreakerFactory - .create("polaris-circuitbreaker-callee-service#/example/service/b/info") - .run(() -> - defaultRestTemplate.getForObject("/example/service/b/info", String.class), - throwable -> "trigger the refuse for service b" - ); - } - - @GetMapping("/getBServiceInfo/fallbackFromPolaris") - public ResponseEntity getBServiceInfoFallback() { - return restTemplateFallbackFromPolaris.getForEntity("/example/service/b/info", String.class); - } - - @GetMapping("/getBServiceInfo/fallbackFromCode") - public ResponseEntity getBServiceInfoFallbackClass() { - return restTemplateFallbackFromCode.getForEntity("/example/service/b/info", String.class); - } - -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/ServiceAResTemplate.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/ServiceAResTemplate.java deleted file mode 100644 index fb6495912..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/ServiceAResTemplate.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.resttemplate.example; - -import com.tencent.cloud.polaris.circuitbreaker.resttemplate.PolarisCircuitBreaker; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.loadbalancer.LoadBalanced; -import org.springframework.context.annotation.Bean; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.util.DefaultUriBuilderFactory; - -/** - * Circuit breaker example caller application. - * - * @author sean yu - */ -@SpringBootApplication -public class ServiceAResTemplate { - - public static void main(String[] args) { - SpringApplication.run(ServiceAResTemplate.class, args); - } - - @Bean - @LoadBalanced - public RestTemplate defaultRestTemplate() { - DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory("http://polaris-circuitbreaker-callee-service"); - RestTemplate restTemplate = new RestTemplate(); - restTemplate.setUriTemplateHandler(uriBuilderFactory); - return restTemplate; - } - - @Bean - @LoadBalanced - @PolarisCircuitBreaker - public RestTemplate restTemplateFallbackFromPolaris() { - DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory("http://polaris-circuitbreaker-callee-service"); - RestTemplate restTemplate = new RestTemplate(); - restTemplate.setUriTemplateHandler(uriBuilderFactory); - return restTemplate; - } - - @Bean - @LoadBalanced - @PolarisCircuitBreaker(fallbackClass = CustomFallback.class) - public RestTemplate restTemplateFallbackFromCode() { - DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory("http://polaris-circuitbreaker-callee-service"); - RestTemplate restTemplate = new RestTemplate(); - restTemplate.setUriTemplateHandler(uriBuilderFactory); - return restTemplate; - } - -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/resources/bootstrap.yml deleted file mode 100644 index 9cd52b817..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,26 +0,0 @@ -server: - port: 48080 -spring: - application: - name: polaris-circuitbreaker-resttemplate-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - loadbalancer: - enabled: true - circuitbreaker: - enabled: true - -logging: - level: - root: info - com.tencent.cloud: debug - -management: - endpoints: - web: - exposure: - include: - - polaris-circuit-breaker diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/pom.xml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/pom.xml deleted file mode 100644 index 5e85be2d8..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - polaris-circuitbreaker-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-circuitbreaker-webclient-example - Polaris Circuit Breaker WebClient Example - - - - org.springframework.boot - spring-boot-starter-webflux - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - org.springframework.cloud - spring-cloud-starter-loadbalancer - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-circuitbreaker - - - - org.springframework.cloud - spring-cloud-starter-bootstrap - - - - org.springframework.boot - 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/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/webclient/example/ServiceAController.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/webclient/example/ServiceAController.java deleted file mode 100644 index 72f3c80d5..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/webclient/example/ServiceAController.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.webclient.example; - -import reactor.core.publisher.Mono; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cloud.client.circuitbreaker.ReactiveCircuitBreakerFactory; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.reactive.function.client.WebClient; - -/** - * Circuit breaker example caller controller. - * - * @author sean yu - */ -@RestController -@RequestMapping("/example/service/a") -public class ServiceAController { - - @Autowired - private ReactiveCircuitBreakerFactory reactiveCircuitBreakerFactory; - - @Autowired - private WebClient.Builder webClientBuilder; - - @GetMapping("/getBServiceInfo") - public Mono getBServiceInfo() { - return webClientBuilder - .build() - .get() - .uri("/example/service/b/info") - .retrieve() - .bodyToMono(String.class) - .transform(it -> - reactiveCircuitBreakerFactory - .create("polaris-circuitbreaker-callee-service#/example/service/b/info") - .run(it, throwable -> Mono.just("fallback: trigger the refuse for service b")) - ); - } - -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/webclient/example/ServiceAWebClient.java b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/webclient/example/ServiceAWebClient.java deleted file mode 100644 index 8104ae873..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/webclient/example/ServiceAWebClient.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.circuitbreaker.webclient.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.loadbalancer.LoadBalanced; -import org.springframework.context.annotation.Bean; -import org.springframework.web.reactive.function.client.WebClient; - -/** - * Circuit breaker example caller application. - * - * @author sean yu - */ -@SpringBootApplication -public class ServiceAWebClient { - - public static void main(String[] args) { - SpringApplication.run(ServiceAWebClient.class, args); - } - - @LoadBalanced - @Bean - WebClient.Builder webClientBuilder() { - return WebClient.builder() - .baseUrl("http://polaris-circuitbreaker-callee-service"); - } -} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/resources/bootstrap.yml deleted file mode 100644 index 9c6f22fde..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,26 +0,0 @@ -server: - port: 48080 -spring: - application: - name: polaris-circuitbreaker-webclient-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - loadbalancer: - enabled: true - circuitbreaker: - enabled: true - -logging: - level: - root: info - com.tencent.cloud: debug - -management: - endpoints: - web: - exposure: - include: - - polaris-circuit-breaker diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/pom.xml b/spring-cloud-tencent-examples/polaris-circuitbreaker-example/pom.xml deleted file mode 100644 index 8e53f8d77..000000000 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - spring-cloud-tencent-examples - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-circuitbreaker-example - Polaris Circuit Breaker Example - pom - - - polaris-circuitbreaker-feign-example - polaris-circuitbreaker-gateway-example - polaris-circuitbreaker-resttemplate-example - polaris-circuitbreaker-webclient-example - polaris-circuitbreaker-callee-service - polaris-circuitbreaker-callee-service2 - - diff --git a/spring-cloud-tencent-examples/polaris-config-example/README-zh.md b/spring-cloud-tencent-examples/polaris-config-example/README-zh.md deleted file mode 100644 index f131d319e..000000000 --- a/spring-cloud-tencent-examples/polaris-config-example/README-zh.md +++ /dev/null @@ -1,77 +0,0 @@ -# Polaris Config Example 使用指南 - -## 1. bootstrap.yml 配置 - -修改 resources/bootstrap.yml ```spring.cloud.polaris.config.address``` 北极星服务端地址。 -> 注意是在 bootstrap.yml 里配置,而不是在 application.yml 里配置。因为配置中心相关的配置是在 bootstrap 阶段依赖的配置。 - -```` yaml -spring: - application: - name: polaris-config-example - cloud: - polaris: - namespace: dev - config: - address: grpc://127.0.0.1:8093 # the address of polaris config server - auto-refresh: true # auto refresh when config file changed - groups: - - name: ${spring.application.name} # group name - files: [ "config/application.properties", "config/bootstrap.yml" ] # config/application.properties takes precedence over config/bootstrap.yml -```` - -## 2. 在北极星服务端创建配置文件 - -### 2.1 创建 namespace (dev) -### 2.2 创建配置文件分组(polaris-config-example) - -北极星的配置文件分组概念为一组配置文件的集合,推荐应用名=分组名,例如在我们的示例中,新建一个 polaris-config-example 的分组。 -把 polaris-config-example 应用的配置文件都放在 polaris-config-example 分组下,这样便于配置管理。 - -### 2.3 创建两个配置文件 config/application.properties 、config/bootstrap.yml - -北极星配置中心的控制台,配置文件名可以通过 / 来按树状目录结构展示,通过树状结构可以清晰的管理配置文件。 - -#### 2.3.1 config/application.properties 文件内容 - - ```` properties -timeout = 3000 -```` - -#### 2.3.2 config/bootstrap.yml 文件内容 - -````yaml -teacher: - name : 张三 - age: 38 -```` - -页面样例如下图所示: - -![](polaris-config-ui.png) - -## 3. 运行 PolarisConfigExampleApplication - -## 4. 访问接口 - -```` -curl "http://localhost:48084/timeout" - -curl "http://localhost:48084/person" -```` - -## 5. 动态推送能力 - -### 5.1 管控台动态修改并发布 config/application.properties - - ```` properties -timeout = 5000 -```` - -### 5.2 再次访问接口 -```` -curl "http://localhost:48084/timeout" -```` - - - diff --git a/spring-cloud-tencent-examples/polaris-config-example/polaris-config-ui.png b/spring-cloud-tencent-examples/polaris-config-example/polaris-config-ui.png deleted file mode 100644 index ebc5a0c0685add833b80398afe158c6313960be9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 116372 zcmce;cQ~7E_&-crrBT(VHCkIYineNt`JmMrEwO?aH5y{pN{mvYrL?7}y;>s?v65J! zrA4V#VkEZOVv7;v&GUWV@Bj7wj^p=7Zub#x*L9!Qb)VPy8Q1;B$Uv6^zz1MrV&ZuC z;NPcAOlRm!OebC0PBXsQu=I>(Vq(^LuBB!4P)ke1$lJr|xtk*s)2$B2M)+r$d@b-WD`t{qVwxKOwe~EN_{UP$*_WdU-tBFhJCr+9)G37t`hIc*tR%E|I zs;%V91&`fe$Ux0uQKnz0P8k{Uc>C5%iR)N}%Ma+xQ&oS$^Ddk|-NGdTuBrdb^nHb? zLObSV{E3RWmqQEZsi)5?pJ`G(VS4expR>=#nJQQkWG;j`-DzN|@J)FCz3;=25kli- zYb()E^m|*q(O}!lmp%_!uNQM)7a=J&=2YC00p|bv?Vn3}#el59pKv9B&S@Q;vuAVe zL>C=aKi7?bBf->PpK@ z`tZT-?5XqWOw50OXyZSzXX(HA0c$_ASYK{w`iAKQo5;(*KP1~GbDsYD=KiN|ZCWRU zjvS8D3ZqNvHWx$=Qc|*bTn{@>%^C>O(ye3JMUT-_nz;I|2jqu>&@rN;&J;Fo@p5f^ z^?<2b<#>Vlzuw&Y_l_1c__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- - polaris-config-example - - - - org.springframework.boot - spring-boot-starter-web - - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-config - - - - org.springframework.boot - 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/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/ConfigController.java b/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/ConfigController.java deleted file mode 100644 index b4fe1a3e7..000000000 --- a/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/ConfigController.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.config.example; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.core.env.Environment; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * the endpoint for get config. - * - * @author lepdou 2022-03-10 - */ -@RestController -public class ConfigController { - - @Value("${timeout:1000}") - private int timeout; - - @Autowired - private Person person; - - @Autowired - private Environment environment; - - @GetMapping("/timeout") - public int timeout() { - environment.getProperty("timeout", "1000"); - return timeout; - } - - @GetMapping("/person") - public String person() { - return person.toString(); - } -} diff --git a/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/Person.java b/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/Person.java deleted file mode 100644 index 38bb2cae6..000000000 --- a/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/Person.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.config.example; - -import java.util.List; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * example property object. - * - * @author lepdou 2022-03-28 - */ -@Component -@ConfigurationProperties(prefix = "teacher") -public class Person { - - private String name; - - private int age; - - private boolean director; - - private List students; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public boolean isDirector() { - return director; - } - - public void setDirector(boolean director) { - this.director = director; - } - - public List getStudents() { - return students; - } - - public void setStudents(List students) { - this.students = students; - } - - @Override - public String toString() { - return "Person{" + - "name='" + name + '\'' + - ", age=" + age + - ", director=" + director + - ", students=" + students + - '}'; - } -} diff --git a/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/PersonConfigChangeListener.java b/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/PersonConfigChangeListener.java deleted file mode 100644 index 108b22038..000000000 --- a/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/PersonConfigChangeListener.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.config.example; - -import java.util.Set; - -import com.tencent.cloud.polaris.config.annotation.PolarisConfigKVFileChangeListener; -import com.tencent.cloud.polaris.config.listener.ConfigChangeEvent; - -import org.springframework.stereotype.Component; - -/** - * Custom Config Listener Example . - * - * @author Palmer Xu 2022-06-06 - */ -@Component -public final class PersonConfigChangeListener { - - /** - * PolarisConfigKVFileChangeListener Example . - * @param event instance of {@link ConfigChangeEvent} - */ - @PolarisConfigKVFileChangeListener(interestedKeyPrefixes = "teacher") - public void onChange(ConfigChangeEvent event) { - Set changedKeys = event.changedKeys(); - - for (String changedKey : changedKeys) { - System.out.printf("%s = %s , ThreadId: %s\n", changedKey, event.getChange(changedKey), Thread.currentThread().getId()); - } - } - - @PolarisConfigKVFileChangeListener(interestedKeyPrefixes = "teacher", async = false) - public void syncListen(ConfigChangeEvent event) { - Set changedKeys = event.changedKeys(); - - for (String changedKey : changedKeys) { - System.out.printf("%s = %s , ThreadId: %s\n", changedKey, event.getChange(changedKey), Thread.currentThread().getId()); - } - } - - @PolarisConfigKVFileChangeListener(interestedKeyPrefixes = "teacher", async = false) - public void syncListen2(ConfigChangeEvent event) { - Set changedKeys = event.changedKeys(); - - for (String changedKey : changedKeys) { - System.out.printf("%s = %s , ThreadId: %s\n", changedKey, event.getChange(changedKey), Thread.currentThread().getId()); - } - } -} diff --git a/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/PolarisConfigExampleApplication.java b/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/PolarisConfigExampleApplication.java deleted file mode 100644 index 37544956b..000000000 --- a/spring-cloud-tencent-examples/polaris-config-example/src/main/java/com/tencent/cloud/polaris/config/example/PolarisConfigExampleApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.config.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * example application starter. - * - * @author lepdou 2022-03-10 - */ -@SpringBootApplication -public class PolarisConfigExampleApplication { - - public static void main(String[] args) { - SpringApplication.run(PolarisConfigExampleApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-config-example/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-config-example/src/main/resources/bootstrap.yml deleted file mode 100644 index 94afb2b7e..000000000 --- a/spring-cloud-tencent-examples/polaris-config-example/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,22 +0,0 @@ -server: - port: 48084 -spring: - application: - name: polaris-config-example - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - config: - auto-refresh: true # auto refresh when config file changed - # data-source: local # config data source default is polaris. - # local-file-root-path: # set root path for reading config file, when in local data source - groups: - - name: ${spring.application.name} # group name - files: [ "config/application.properties", "config/bootstrap.yml" ] # config/application.properties takes precedence over config/bootstrap.yml -management: - endpoints: - web: - exposure: - include: - - polaris-config diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/README-zh.md b/spring-cloud-tencent-examples/polaris-discovery-example/README-zh.md deleted file mode 100644 index 851860f06..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/README-zh.md +++ /dev/null @@ -1,67 +0,0 @@ -# Spring Cloud Polaris Discovery example - -## 样例简介 - -本样例将介绍如何在Spring Cloud项目中使用```spring-cloud-starter-tencent-polaris-discovery```以使用其各项功能。 - -该样例分为两个微服务,即 ```discovery-caller-service``` 和 ```discovery-callee-service ```。 -其中 ```discovery-caller-service``` 调用 ```discovery-callee-service``` - -## 使用说明 - -### 修改配置 - -修改 resource/bootstrap.yml 中北极星的服务端地址 - -```yaml -spring: - cloud: - polaris: - address: grpc://${ip}:8091 -``` - -### 启动样例 - -#### 启动Polaris后端服务 - -参考[Polaris Getting Started](https://github.com/PolarisMesh/polaris#getting-started)。 - -#### 启动应用 - -- IDEA启动 - -分别启动 - -1. ```spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service```下的```DiscoveryCallerService``` -2. ```spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service```下的```DiscoveryCalleeService``` - -### 验证 - -#### 调用 discovery-caller-service 暴露的接口 - -执行以下命令发起Feign调用,其逻辑为```DiscoveryCalleeService```返回 value1+value2 的和 - -```shell -curl -L -X GET 'http://localhost:48080/discovery/service/caller/feign?value1=1&value2=2' -``` - -预期返回值 - -``` -3 -``` - -#### RestTemplate调用 - -执行以下命令发起RestTemplate调用,其逻辑为```DiscoveryCalleeService```返回一段字符串 - -```shell -curl -L -X GET 'http://localhost:48080/discovery/service/caller/rest' -``` - -预期返回值 - -``` -Discovery Service Callee -``` - diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/README.md b/spring-cloud-tencent-examples/polaris-discovery-example/README.md deleted file mode 100644 index c9280f6f4..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Spring Cloud Polaris Discovery example - -## Example Introduction - -This example shows how to use ```spring-cloud-starter-tencent-polaris-discovery`` in Spring Cloud project for its features. - -This example is divided to two microservice, discovery-caller-service and discovery-callee-service. In these two microservices, discovery-caller-service invokes discovery-callee-service. - -## Instruction - -### Configuration - -The configuration is as the following shows. ${ip} and ${port} are Polaris backend IP address and port number. - -```yaml -spring: - application: - name: ${application.name} - cloud: - polaris: - address: ${ip}:${port} -``` - -### Launching Example - -#### Launching Polaris Backend Service - -Reference to [Polaris Getting Started](https://github.com/PolarisMesh/polaris#getting-started) - -#### Launching Application - -- IDEA Launching - -Launching ```spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service```'s ```DiscoveryCallerService``` and ```spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service```'s ```DiscoveryCalleeService``` - -- Maven Package Launching - -Execute under ```spring-cloud-tencent-examples/polaris-discovery-example``` - -```sh -mvn clean package -``` - -Then at ```discovery-caller-service``` and ```discovery-callee-service``` find the package that generates jar, and run it - -``` -java -jar ${app.jar} -``` - -Launch application, change ${app.jar} to jar's package name - -### Verify - -#### Feign Invoke - -Execute the following orders to invoke Feign, ```DiscoveryCalleeService``` goes bank to the sum of value1+value2 - -```shell -curl -L -X GET 'http://localhost:48080/discovery/service/caller/feign?value1=1&value2=2' -``` - -Expected return rate - -``` -3 -``` - -#### RestTemplate Invoke - -Execute the following orders to invoke RestTemplate, ```DiscoveryCalleeService``` goes back to string characters - -```shell -curl -L -X GET 'http://localhost:48080/discovery/service/caller/rest' -``` - -Expected return rate - -``` -Discovery Service Callee -``` - diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/pom.xml b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/pom.xml deleted file mode 100644 index 312b45c1a..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - polaris-discovery-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - discovery-callee-service - Polaris Discovery Callee Service - - - - org.springframework.boot - spring-boot-starter-webflux - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-contract - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - - - - - - - - - - - org.springframework.cloud - spring-cloud-starter-bootstrap - - - - - - - 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/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/CustomMetadata.java b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/CustomMetadata.java deleted file mode 100644 index fbfa22614..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/CustomMetadata.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.discovery.service.callee; - -import java.util.HashMap; -import java.util.Map; - -import com.tencent.cloud.common.spi.InstanceMetadataProvider; - -import org.springframework.stereotype.Component; - -/** - * custom metadata for instance. - * - * @author lepdou 2022-06-16 - */ -@Component -public class CustomMetadata implements InstanceMetadataProvider { - - @Override - public Map getMetadata() { - Map metadata = new HashMap<>(); - metadata.put("k1", "v1"); - return metadata; - } - - @Override - public String getZone() { - return "shanghai-zone-1"; - } -} diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/DiscoveryCalleeController.java b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/DiscoveryCalleeController.java deleted file mode 100644 index a15336393..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/DiscoveryCalleeController.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.discovery.service.callee; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -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.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -/** - * Discovery callee controller. - * - * @author Haotian Zhang - */ -@RestController -@RequestMapping("/discovery/service/callee") -public class DiscoveryCalleeController { - - private static final Logger LOG = LoggerFactory.getLogger(DiscoveryCalleeController.class); - - @Value("${server.port:0}") - private int port; - - @Value("${spring.cloud.client.ip-address:127.0.0.1}") - private String ip; - - /** - * Get information of callee. - * - * @return information of callee - */ - @GetMapping("/info") - public String info() { - LOG.info("Discovery Service Callee [{}:{}] is called.", ip, port); - return String.format("Discovery Service Callee [%s:%s] is called.", ip, port); - } - - /** - * Get sum of two value. - * - * @param value1 value 1 - * @param value2 value 2 - * @return sum - */ - @GetMapping("/sum") - public int sum(@RequestParam int value1, @RequestParam int value2) { - LOG.info("Discovery Service Callee [{}:{}] is called and sum is {}.", ip, port, value1 + value2); - return value1 + value2; - } -} diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/DiscoveryCalleeService.java b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/DiscoveryCalleeService.java deleted file mode 100644 index 9063ae984..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/java/com/tencent/cloud/polaris/discovery/service/callee/DiscoveryCalleeService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.discovery.service.callee; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Discovery callee application. - * - * @author Haotian Zhang - */ -@SpringBootApplication -public class DiscoveryCalleeService { - - public static void main(String[] args) { - SpringApplication.run(DiscoveryCalleeService.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/resources/bootstrap.yml deleted file mode 100644 index 1f3a5b9e5..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,53 +0,0 @@ -server: - port: ${random.int(7003,7005)} -spring: - application: - name: DiscoveryCalleeService - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - discovery: - enabled: true - register: true - contract: - exposure: true - stat: - enabled: true - port: 28082 - # pushgateway: - # enabled: true - # address: 127.0.0.1:9091 - tencent: - metadata: - content: - region: shanghai - rpc-enhancement: - reporter: - enabled: true -# consul: -# port: 8500 -# host: 127.0.0.1 -# enabled: true -# discovery: -# enabled: true -# register: true -# instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${server.port} -# service-name: ${spring.application.name} -# ip-address: localhost -# prefer-ip-address: true -# nacos: -# enabled: true -# password: nacos -# username: nacos -# discovery: -# enabled: true -# register-enabled: true -# group: polaris -# server-addr: 127.0.0.1:8848 - -#eureka: -# client: -# serviceUrl: -# defaultZone: http://127.0.0.1:7654/eureka/ diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/pom.xml b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/pom.xml deleted file mode 100644 index f6a28f36e..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - polaris-discovery-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - discovery-caller-service - Polaris Discovery Caller Service - - - 1.8 - - - - - org.springframework.boot - spring-boot-starter-web - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-contract - - - - - - - - - - - - - - - - - - - - - - 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/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCalleeService.java b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCalleeService.java deleted file mode 100644 index 44d20df14..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCalleeService.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.discovery.service.caller; - -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; - -/** - * Discovery callee feign client. - * - * @author Haotian Zhang - */ -@FeignClient(value = "DiscoveryCalleeService", fallback = DiscoveryCalleeServiceFallback.class) -public interface DiscoveryCalleeService { - - /** - * Get sum of two value. - * @param value1 value 1 - * @param value2 value 2 - * @return sum - */ - @GetMapping("/discovery/service/callee/sum") - int sum(@RequestParam("value1") int value1, @RequestParam("value2") int value2); -} diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCallerController.java b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCallerController.java deleted file mode 100644 index 166441cd6..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCallerController.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.discovery.service.caller; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.RestTemplate; - -/** - * Discovery caller controller. - * - * @author Haotian Zhang - */ -@RestController -@RequestMapping("/discovery/service/caller") -public class DiscoveryCallerController { - - @Autowired - private RestTemplate restTemplate; - - @Autowired - private DiscoveryCalleeService discoveryCalleeService; - - /** - * Get sum of two value. - * @param value1 value 1 - * @param value2 value 2 - * @return sum - */ - @RequestMapping("/feign") - public int feign(@RequestParam int value1, @RequestParam int value2) { - return discoveryCalleeService.sum(value1, value2); - } - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest() { - return restTemplate.getForObject("http://DiscoveryCalleeService/discovery/service/callee/info", String.class); - } - - /** - * health check. - * @return health check info - */ - @GetMapping("/healthCheck") - public String healthCheck() { - return "pk ok"; - } -} diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCallerService.java b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCallerService.java deleted file mode 100644 index 5c447313c..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCallerService.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.discovery.service.caller; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.cloud.client.loadbalancer.LoadBalanced; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Bean; -import org.springframework.web.client.RestTemplate; - -/** - * Discovery caller application. - * - * @author Haotian Zhang - */ -@SpringBootApplication -@EnableDiscoveryClient -@EnableFeignClients -public class DiscoveryCallerService { - - public static void main(String[] args) { - SpringApplication.run(DiscoveryCallerService.class, args); - } - - @Bean - @LoadBalanced - public RestTemplate restTemplate() { - return new RestTemplate(); - } -} diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/resources/bootstrap.yml deleted file mode 100644 index c338f6877..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,68 +0,0 @@ -server: - session-timeout: 1800 - port: 48080 -spring: - application: - name: DiscoveryCallerService - cloud: - tencent: - metadata: - content: - region: shanghai - rpc-enhancement: - reporter: - enabled: false - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - discovery: - enabled: true - register: true - heartbeat: - enabled: true - health-check-url: /discovery/service/caller/healthCheck - contract: - exposure: true - report: - enabled: true - stat: - enabled: true - port: 28081 -# pushgateway: -# enabled: true -# address: 127.0.0.1:9091 -# consul: -# port: 8500 -# host: 127.0.0.1 -# enabled: true -# discovery: -# enabled: true -# register: true -# health-check-path: /actuator/health -# health-check-interval: 10s -# instance-id: ${spring.application.name}:${server.port} -# service-name: ${spring.application.name} -# ip-address: localhost -# prefer-ip-address: true -# nacos: -# enabled: true -# password: nacos -# username: nacos -# context-path: /nacos -# discovery: -# enabled: true -# register-enabled: true -# group: polaris -# server-addr: 127.0.0.1:8848 -# cluster-name: polaris -#eureka: -# client: -# serviceUrl: -# defaultZone: http://127.0.0.1:7654/eureka/ -management: - endpoints: - web: - exposure: - include: - - polaris-discovery diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/pom.xml b/spring-cloud-tencent-examples/polaris-discovery-example/pom.xml deleted file mode 100644 index 2ce2a3e3d..000000000 --- a/spring-cloud-tencent-examples/polaris-discovery-example/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - spring-cloud-tencent-examples - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-discovery-example - pom - Spring Cloud Starter Tencent Polaris Discovery Example - - - discovery-callee-service - discovery-caller-service - - - - - org.springframework.boot - spring-boot-starter-actuator - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/README-zh.md b/spring-cloud-tencent-examples/polaris-gateway-example/README-zh.md deleted file mode 100644 index 57148902e..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/README-zh.md +++ /dev/null @@ -1,80 +0,0 @@ -# Spring Cloud Polaris Gateway example - -## 样例简介 - -本样例将介绍如何在Spring Cloud项目中使用```spring-cloud-tencent-polaris-gateway```以使用其各项功能。 - -本样例包括```gateway-zuul-service```、```gateway-scg-service```和```gateway-callee-service```。```gateway-zuul-service```和```gateway-scg-service```调用```gateway-callee-service```。 - -## 使用说明 - -### 修改配置 - -配置如下所示。其中,${ip}和${port}为Polaris后端服务的IP地址与端口号。 - -```yaml -spring: - application: - name: ${application.name} - cloud: - polaris: - address: ${ip}:${port} -``` - -### 启动样例 - -#### 启动Polaris后端服务 - -参考[Polaris Getting Started](https://github.com/PolarisMesh/polaris#getting-started)。 - -#### 启动应用 - -- IDEA启动 - -分别启动```spring-cloud-tencent-examples/polaris-gateway-example/gateway-zuul-service```的```GatewayZuulService```、```spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service```的```GatewayScgService```和```spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service```的```GatewayCalleeService``` - -- Maven打包启动 - -在```spring-cloud-tencent-examples/polaris-gateway-example```下执行 - -```sh -mvn clean package -``` - -然后在```gateway-zuul-service```、```gateway-scg-service```和```gateway-callee-service```下找到生成的jar包,运行 - -``` -java -jar ${app.jar} -``` - -启动应用,其中${app.jar}替换为对应的jar包名。 - -### 验证 - -#### Zuul调用 - -```shell -curl -L -X GET 'http://localhost:48082/GatewayCalleeService/gateway/example/callee/echo' -H 'SCT-CUSTOM-METADATA: {"b": 2}' -``` - -预期返回值 - -``` -{"a":"1","b":2} -``` - -#### Spring-Cloud-Gateway调用 - -```shell -curl -L -X GET 'http://localhost:48083/GatewayCalleeService/gateway/example/callee/echo' -H 'SCT-CUSTOM-METADATA: {"b": 2}' -``` - -预期返回值 - -``` -{"a":"1","b":2} -``` - -#### 网关限流 - -参考[Polaris RateLimit Example](../polaris-ratelimit-example/README-zh.md) diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/README.md b/spring-cloud-tencent-examples/polaris-gateway-example/README.md deleted file mode 100644 index b1bb35671..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Spring Cloud Polaris Gateway example - -## Example Introduction - -This example shows how to use ```spring-cloud-tencent-polaris-gateway``` in Spring Cloud project for its features. - -This example contains ```gateway-zuul-service```, ```gateway-scg-service``` and ```gateway-callee-service```. ```gateway-zuul-service``` and ```gateway-scg-service``` invoke ```gateway-callee-service```. - -## Instruction - -### Configuration - -The configuration is as the following shows. ${ip} and ${port} are Polaris backend IP address and port number. - -```yaml -spring: - application: - name: ${application.name} - cloud: - polaris: - address: ${ip}:${port} -``` - -### Launching Example - -#### Launching Polaris Backend Service - -Reference to [Polaris Getting Started](https://github.com/PolarisMesh/polaris#getting-started) - -#### Launching Application - -- IDEA Launching - -Launching ```spring-cloud-tencent-examples/polaris-gateway-example/gateway-zuul-service```'s ```GatewayZuulService```, ```spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service```'s ```GatewayScgService``` and ```spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service```'s ```GatewayCalleeService``` - -- Maven Package Launching - -Execute under ```spring-cloud-tencent-examples/polaris-gateway-example``` - -```sh -mvn clean package -``` - -Then find the jars under ```gateway-zuul-service```, ```gateway-scg-service``` and ```gateway-callee-service```, and run it: - -``` -java -jar ${app.jar} -``` - -Launch application, change ${app.jar} to jar's package name. - -### Verify - -#### Zuul Invoke - -```shell -curl -L -X GET 'http://localhost:48082/GatewayCalleeService/gateway/example/callee/echo' -H 'SCT-CUSTOM-METADATA: {"b": 2}' -``` - -Expected return rate - -``` -{"a":"1","b":2} -``` - -#### Spring-Cloud-Gateway Invoke - -```shell -curl -L -X GET 'http://localhost:48083/GatewayCalleeService/gateway/example/callee/echo' -H 'SCT-CUSTOM-METADATA: {"b": 2}' -``` - -Expected return rate - -``` -{"a":"1","b":2} -``` - -#### Gateway Rate Limit - -See [Polaris RateLimit Example](../polaris-ratelimit-example/README.md) - diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/pom.xml b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/pom.xml deleted file mode 100644 index cc37a455b..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - polaris-gateway-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - gateway-callee-service - Spring Cloud Starter Tencent Polaris Gateway Callee Example - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - com.tencent.cloud - spring-cloud-starter-tencent-metadata-transfer - - - - org.springframework.boot - spring-boot-starter-web - - - diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeApplication.java b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeApplication.java deleted file mode 100644 index 57d205e5e..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.gateway.example.callee; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Gateway callee application. - * - * @author Haotian Zhang - */ -@SpringBootApplication -public class GatewayCalleeApplication { - - public static void main(String[] args) { - SpringApplication.run(GatewayCalleeApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeController.java b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeController.java deleted file mode 100644 index 7736ed640..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeController.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.gateway.example.callee; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; - -import com.tencent.cloud.common.constant.MetadataConstant; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import static com.tencent.cloud.common.constant.ContextConstant.UTF_8; - -/** - * Gateway callee controller. - * - * @author Haotian Zhang - */ -@RestController -@RequestMapping("/gateway/example/callee") -public class GatewayCalleeController { - - private static Logger LOG = LoggerFactory.getLogger(GatewayCalleeController.class); - - @Value("${server.port:0}") - private int port; - - /** - * Get information of callee. - * @return information of callee - */ - @RequestMapping("/info") - public String info() { - LOG.info("Gateway Example Callee [{}] is called.", port); - return String.format("Gateway Example Callee [%s] is called.", port); - } - - /** - * Get metadata in HTTP header. - * - * @param metadataStr metadata string - * @return metadata in HTTP header - * @throws UnsupportedEncodingException encoding exception - */ - @RequestMapping("/echo") - public String echoHeader(@RequestHeader(MetadataConstant.HeaderName.CUSTOM_METADATA) String metadataStr) - throws UnsupportedEncodingException { - LOG.info(URLDecoder.decode(metadataStr, UTF_8)); - metadataStr = URLDecoder.decode(metadataStr, UTF_8); - return metadataStr; - } -} diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/resources/bootstrap.yml deleted file mode 100644 index 9bf39bb82..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,14 +0,0 @@ -server: - session-timeout: 1800 - port: 48081 -spring: - application: - name: GatewayCalleeService - cloud: - tencent: - metadata: - content: - env: blue - polaris: - address: grpc://119.91.66.223:8091 - namespace: default diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/pom.xml b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/pom.xml deleted file mode 100644 index 1f0a2d1b9..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - polaris-gateway-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - gateway-callee-service2 - Spring Cloud Starter Tencent Polaris Gateway Callee Example - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - com.tencent.cloud - spring-cloud-starter-tencent-metadata-transfer - - - - org.springframework.boot - spring-boot-starter-web - - - diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeApplication2.java b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeApplication2.java deleted file mode 100644 index f6a942abd..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeApplication2.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.gateway.example.callee; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Gateway callee application. - * - * @author Haotian Zhang - */ -@SpringBootApplication -public class GatewayCalleeApplication2 { - - public static void main(String[] args) { - SpringApplication.run(GatewayCalleeApplication2.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeController.java b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeController.java deleted file mode 100644 index 7736ed640..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/java/com/tencent/cloud/polaris/gateway/example/callee/GatewayCalleeController.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.gateway.example.callee; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; - -import com.tencent.cloud.common.constant.MetadataConstant; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import static com.tencent.cloud.common.constant.ContextConstant.UTF_8; - -/** - * Gateway callee controller. - * - * @author Haotian Zhang - */ -@RestController -@RequestMapping("/gateway/example/callee") -public class GatewayCalleeController { - - private static Logger LOG = LoggerFactory.getLogger(GatewayCalleeController.class); - - @Value("${server.port:0}") - private int port; - - /** - * Get information of callee. - * @return information of callee - */ - @RequestMapping("/info") - public String info() { - LOG.info("Gateway Example Callee [{}] is called.", port); - return String.format("Gateway Example Callee [%s] is called.", port); - } - - /** - * Get metadata in HTTP header. - * - * @param metadataStr metadata string - * @return metadata in HTTP header - * @throws UnsupportedEncodingException encoding exception - */ - @RequestMapping("/echo") - public String echoHeader(@RequestHeader(MetadataConstant.HeaderName.CUSTOM_METADATA) String metadataStr) - throws UnsupportedEncodingException { - LOG.info(URLDecoder.decode(metadataStr, UTF_8)); - metadataStr = URLDecoder.decode(metadataStr, UTF_8); - return metadataStr; - } -} diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/resources/bootstrap.yml deleted file mode 100644 index 83f98b12f..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-callee-service2/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,14 +0,0 @@ -server: - session-timeout: 1800 - port: 48082 -spring: - application: - name: GatewayCalleeService - cloud: - tencent: - metadata: - content: - env: green - polaris: - address: grpc://119.91.66.223:8091 - namespace: default diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/pom.xml b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/pom.xml deleted file mode 100644 index 1d9887427..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - polaris-gateway-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - gateway-scg-service - Spring Cloud Starter Tencent Polaris Gateway SCG Example - - - - spring-cloud-starter-tencent-polaris-discovery - com.tencent.cloud - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-ratelimit - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-router - - - - com.tencent.cloud - spring-cloud-tencent-gateway-plugin - - - - com.tencent.cloud - spring-cloud-starter-tencent-metadata-transfer - - - - com.tencent.cloud - spring-cloud-tencent-featureenv-plugin - - - - org.springframework.cloud - spring-cloud-starter-gateway - - - diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/src/main/java/com/tencent/cloud/polaris/gateway/example/scg/GatewayScgApplication.java b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/src/main/java/com/tencent/cloud/polaris/gateway/example/scg/GatewayScgApplication.java deleted file mode 100644 index 7bf729994..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/src/main/java/com/tencent/cloud/polaris/gateway/example/scg/GatewayScgApplication.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.gateway.example.scg; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * SCG application. - * - * @author Haotian Zhang - */ -@SpringBootApplication -public class GatewayScgApplication { - - public static void main(String[] args) { - SpringApplication.run(GatewayScgApplication.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/src/main/resources/bootstrap.yml deleted file mode 100644 index 7f1aa5671..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/gateway-scg-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,68 +0,0 @@ -server: - session-timeout: 1800 - port: 48083 -spring: - application: - name: GatewayScgService - cloud: - tencent: - plugin: - scg: - staining: - enabled: true - rule-staining: - enabled: true - router: - feature-env: - enabled: true - metadata: - content: - a: 1 - transitive: - - a - 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: GatewayCalleeService - uri: lb://GatewayCalleeService - predicates: - - Path=/GatewayCalleeService/** - filters: - - StripPrefix=1 diff --git a/spring-cloud-tencent-examples/polaris-gateway-example/pom.xml b/spring-cloud-tencent-examples/polaris-gateway-example/pom.xml deleted file mode 100644 index e67b8a8dd..000000000 --- a/spring-cloud-tencent-examples/polaris-gateway-example/pom.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - spring-cloud-tencent-examples - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-gateway-example - pom - Spring Cloud Starter Tencent Polaris Gateway Example - - - gateway-scg-service - gateway-callee-service - gateway-callee-service2 - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - - diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/README-zh.md b/spring-cloud-tencent-examples/polaris-ratelimit-example/README-zh.md deleted file mode 100644 index b9c30ddfe..000000000 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/README-zh.md +++ /dev/null @@ -1,59 +0,0 @@ -# Spring Cloud Polaris RateLimit Example - -## 项目说明 - -本项目演示如何使用 Polaris ratelimit starter 完成 Spring Cloud 应用的限流管理。 - -## 示例 - -### 如何接入 - -在启动示例进行演示之前,我们先了解一下如何接入 Polaris 限流组件。 - -> **注意:本章节只是为了便于您理解接入方式,本示例代码中已经完成接入工作,您无需再进行修改。** - -1. 首先,修改 `pom.xml` 文件,引入 Polaris ratelimit starter。 - ```xml - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-ratelimit - - ``` - -2. 启动应用 - - 北极星提供的example都支持在IDE中直接运行,或者编译打包后通过命令行方式进行运行。 - - 在本地启动Polaris服务端。 - - 在北极星服务端,可以通过控制台,在命名空间Production下,添加服务RateLimitCalleeService。 - - 启动服务被调方: - 1. IDE直接启动:找到主类 `RateLimitCalleeService`,执行 main 方法启动应用。 - 2. 打包编译后启动:首先执行 `mvn clean package` 将工程编译打包,然后执行 `java -jar ratelimit-callee-sevice-${verion}.jar`启动应用。 - - 启动后,可以在北极星控制台上看到注册上来的服务实例信息。 - -3. 调用服务 - - 通过浏览器访问http://127.0.0.1:48081/business/invoke,可以看到以下输出信息: - ```` - hello world for ratelimit service 1 - hello world for ratelimit service 2 - hello world for ratelimit service 3 - ... - ```` - -4. 配置限流规则并验证 - 北极星提供了三个方式进行限流规则的配置(控制台、HTTP接口以及本地文件)。 - - 本示例使用的方式为通过HTTP接口进行配置。通过以下命令来配置: - ```` - curl -X POST -H "Content-Type:application/json" 127.0.0.1:8090/naming/v1/ratelimits -d @rule.json - ```` - -5. 验证限流效果 - 继续访问http://127.0.0.1:48081/business/invoke,可以看到,10次调用后,就开始被限流: - ```` - hello world for ratelimit service 1 - hello world for ratelimit service 2 - ... - hello world for ratelimit service 10 - request has been limited, service is RateLimitCalleeService, path is /business/invoke, 11 - ```` \ No newline at end of file diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/README.md b/spring-cloud-tencent-examples/polaris-ratelimit-example/README.md deleted file mode 100644 index 5b85e6077..000000000 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# Spring Cloud Polaris RateLimit Example - -## Project Explanation - -This project shows how to use ratelimit feature of Polaris to complete Spring Cloud application's rate limit - -## Example - -### How to access - -Before showcasing the project, let's get to know how to access Polaris rate limit component - -> ** note: this chapter is to help you understand different ways to access, the codes in the example has been executed, you don't need to re-edit.** - -1, first, change document `pom.xml`, introduce Polaris ratelimit starter - - ```xml - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-ratelimit - - ``` - -2. Launch Application - -Examples provided by Polaris all support to run at IDE, or compile and run with orders - -- Launch Polaris locally - -- at Polaris end, through control panel, under namespace Product, add RateLimitCalleeService - -- Launch callee server: - - 1. Launch IDE directly: First find `RateLimitCalleeService`, execute main then launch application - 2. compile package then launch: first execute `mvn clean package` compile the package, then execute `java -jar ratelimit-callee-sevice-${verion}.jar` execute the application - - - After launching, one can watch server instance from Polaris control panel - - 3. Invoke Service - - After visiting http://127.0.0.1:48081/business/invoke, one can see the following information: - - ```` - hello world for ratelimit service 1 - hello world for ratelimit service 2 - hello world for ratelimit service 3 - ... - ```` - -4. Configuration rate limit and verification - Polaris provide three wats to conduct rate limit configuration (control panel, HTTP port and local files) - -this example is HTTP configuration. One can figure with the following steps: - - ```` - curl -X POST -H "Content-Type:application/json" 127.0.0.1:8090/naming/v1/ratelimits -d @rule.json - ```` - -5. Verify rate limit result - continue visit http://127.0.0.1:48081/business/invoke, one can see, after 10 invokes, rate limit will start: - - ```` - hello world for ratelimit service 1 - hello world for ratelimit service 2 - - ```` \ No newline at end of file diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/pom.xml b/spring-cloud-tencent-examples/polaris-ratelimit-example/pom.xml deleted file mode 100644 index c23178094..000000000 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/pom.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - spring-cloud-tencent-examples - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-ratelimit-example - pom - Spring Cloud Starter Tencent Polaris RateLimit Example - - - ratelimit-callee-service - - \ No newline at end of file diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/pom.xml b/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/pom.xml deleted file mode 100644 index 613cf24f7..000000000 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - polaris-ratelimit-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - ratelimit-callee-service - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-webflux - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-ratelimit - - - - org.springframework.boot - spring-boot-starter-actuator - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/BusinessController.java b/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/BusinessController.java deleted file mode 100644 index 902d6681f..000000000 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/BusinessController.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.ratelimit.example.service.callee; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import reactor.core.publisher.Mono; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.HttpClientErrorException.TooManyRequests; -import org.springframework.web.client.RestClientException; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.web.reactive.function.client.WebClientResponseException; - -/** - * Rate limit controller. - * - * @author Haotian Zhang - */ -@RestController -@RequestMapping("/business") -public class BusinessController { - - private static final Logger LOG = LoggerFactory.getLogger(BusinessController.class); - - private final AtomicInteger index = new AtomicInteger(0); - private final AtomicLong lastTimestamp = new AtomicLong(0); - @Autowired - private RestTemplate restTemplate; - @Autowired - private WebClient.Builder webClientBuilder; - @Value("${spring.application.name}") - private String appName; - - /** - * Get information. - * - * @return information - */ - @GetMapping("/info") - public String info() { - return "hello world for ratelimit service " + index.incrementAndGet(); - } - - @GetMapping("/info/webclient") - public Mono infoWebClient() { - return Mono.just("hello world for ratelimit service " + index.incrementAndGet()); - } - - @GetMapping("/invoke/webclient") - public String invokeInfoWebClient() throws InterruptedException, ExecutionException { - StringBuffer builder = new StringBuffer(); - WebClient webClient = webClientBuilder.baseUrl("http://" + appName).build(); - List> monoList = new ArrayList<>(); - for (int i = 0; i < 30; i++) { - Mono response = webClient.get() - .uri(uriBuilder -> uriBuilder - .path("/business/info/webclient") - .queryParam("yyy", "yyy") - .build() - ) - .header("xxx", "xxx") - .retrieve() - .bodyToMono(String.class) - .doOnSuccess(s -> builder.append(s + "\n")) - .doOnError(e -> { - if (e instanceof WebClientResponseException) { - if (((WebClientResponseException) e).getRawStatusCode() == 429) { - builder.append("TooManyRequests ").append(index.incrementAndGet() + "\n"); - } - } - }) - .onErrorReturn(""); - monoList.add(response); - } - for (Mono mono : monoList) { - mono.toFuture().get(); - } - index.set(0); - return builder.toString(); - } - - /** - * Get information 30 times per 1 second. - * - * @return result of 30 calls. - * @throws InterruptedException exception - */ - @GetMapping("/invoke") - public String invokeInfo() throws InterruptedException { - StringBuffer builder = new StringBuffer(); - CountDownLatch count = new CountDownLatch(30); - for (int i = 0; i < 30; i++) { - new Thread(() -> { - try { - HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.add("xxx", "xxx"); - ResponseEntity entity = restTemplate.exchange( - "http://" + appName + "/business/info?yyy={yyy}", - HttpMethod.GET, - new HttpEntity<>(httpHeaders), - String.class, - "yyy" - ); - builder.append(entity.getBody() + "\n"); - } - catch (RestClientException e) { - if (e instanceof TooManyRequests) { - builder.append("TooManyRequests ").append(index.incrementAndGet() + "\n"); - } - else { - throw e; - } - } - catch (Exception e) { - e.printStackTrace(); - } - finally { - count.countDown(); - } - }).start(); - } - count.await(); - index.set(0); - return builder.toString(); - } - - /** - * Get information with unirate. - * - * @return information - */ - @GetMapping("/unirate") - public String unirate() { - long currentTimestamp = System.currentTimeMillis(); - long lastTime = lastTimestamp.get(); - if (lastTime != 0) { - LOG.info("Current timestamp:" + currentTimestamp + ", diff from last timestamp:" + (currentTimestamp - lastTime)); - } - else { - LOG.info("Current timestamp:" + currentTimestamp); - } - lastTimestamp.set(currentTimestamp); - return "hello world for ratelimit service with diff from last request:" + (currentTimestamp - lastTime) + "ms."; - } -} diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/RateLimitCalleeService.java b/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/RateLimitCalleeService.java deleted file mode 100644 index c8a49d2a7..000000000 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/RateLimitCalleeService.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.ratelimit.example.service.callee; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.loadbalancer.LoadBalanced; -import org.springframework.context.annotation.Bean; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.reactive.function.client.WebClient; - -/** - * Rate limit application. - * - * @author Haotian Zhang - */ -@SpringBootApplication -public class RateLimitCalleeService { - - public static void main(String[] args) { - SpringApplication.run(RateLimitCalleeService.class, args); - } - - @Bean - @LoadBalanced - public RestTemplate restTemplate() { - return new RestTemplate(); - } - - - @LoadBalanced - @Bean - WebClient.Builder webClientBuilder() { - return WebClient.builder(); - } -} diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/resources/bootstrap.yml deleted file mode 100644 index d2e813284..000000000 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,26 +0,0 @@ -server: - port: 48081 -spring: - application: - name: RateLimitCalleeService - cloud: - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - ratelimit: - enabled: true - rejectRequestTipsFilePath: reject-tips.html - maxQueuingTime: 500 - stat: - enabled: true - port: 28083 -management: - endpoints: - web: - exposure: - include: - - polaris-ratelimit -logging: - level: - com.tencent.cloud.polaris: debug diff --git a/spring-cloud-tencent-examples/polaris-router-example/pom.xml b/spring-cloud-tencent-examples/polaris-router-example/pom.xml deleted file mode 100644 index 5ae91d8bf..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - spring-cloud-tencent-examples - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - polaris-router-example - pom - - - router-callee-service1 - router-callee-service2 - router-caller-service - - diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/pom.xml b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/pom.xml deleted file mode 100644 index ee07d5401..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - polaris-router-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - router-callee-service1 - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.cloud - spring-cloud-starter-bootstrap - - - - - - - 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/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeApplication1.java b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeApplication1.java deleted file mode 100644 index 9c36234c4..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeApplication1.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Router callee application. - * - * @author lepdou 2022-04-06 - */ -@SpringBootApplication -public class RouterCalleeApplication1 { - - public static void main(String[] args) { - SpringApplication.run(RouterCalleeApplication1.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeController.java b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeController.java deleted file mode 100644 index ead2c1fe1..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeController.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * Discovery callee controller. - * - * @author lepdou 2022-04-06 - */ -@RestController -@RequestMapping("/router/service/callee") -public class RouterCalleeController { - - private static Logger LOG = LoggerFactory.getLogger(RouterCalleeController.class); - - @Value("${server.port:0}") - private int port; - - /** - * Get information of callee. - * @return information of callee - */ - @PostMapping("/info") - public String info(String name, @RequestBody User user) { - LOG.info("Discovery Service Callee [{}] is called.", port); - return String.format("Discovery Service Callee [%s] is called. user = %s", port, user); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/User.java b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/User.java deleted file mode 100644 index ff83552db..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/java/com/tencent/cloud/polaris/router/example/User.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -/** - * demo object. - * @author lepdou 2022-05-12 - */ -public class User { - - private String name; - private int age; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - @Override - public String toString() { - return "User{" + - "name='" + name + '\'' + - ", age=" + age + - '}'; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/resources/bootstrap.yml deleted file mode 100644 index e3248f4da..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service1/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,14 +0,0 @@ -server: - port: 48081 -spring: - application: - name: RouterCalleeService - cloud: - tencent: - metadata: - content: - label1: value1 - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/pom.xml b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/pom.xml deleted file mode 100644 index 8ee075153..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - polaris-router-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - router-callee-service2 - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - org.springframework.boot - spring-boot-starter-webflux - - - - org.springframework.cloud - spring-cloud-starter-bootstrap - - - - - - - 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/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeApplication2.java b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeApplication2.java deleted file mode 100644 index 076a002f0..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeApplication2.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Router callee application. - * - * @author lepdou 2022-04-06 - */ -@SpringBootApplication -public class RouterCalleeApplication2 { - - public static void main(String[] args) { - SpringApplication.run(RouterCalleeApplication2.class, args); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeController.java b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeController.java deleted file mode 100644 index 075887766..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeController.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -/** - * Discovery callee controller. - * - * @author lepdou 2022-04-06 - */ -@RestController -@RequestMapping("/router/service/callee") -public class RouterCalleeController { - - private static Logger LOG = LoggerFactory.getLogger(RouterCalleeController.class); - - @Value("${server.port:0}") - private int port; - - /** - * Get information of callee. - * @return information of callee - */ - @PostMapping("/info") - public String info(@RequestParam("name") String name, @RequestBody User user) { - LOG.info("Discovery Service Callee [{}] is called.", port); - return String.format("Discovery Service Callee [%s] is called. user = %s", port, user); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/User.java b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/User.java deleted file mode 100644 index ff83552db..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/java/com/tencent/cloud/polaris/router/example/User.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -/** - * demo object. - * @author lepdou 2022-05-12 - */ -public class User { - - private String name; - private int age; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - @Override - public String toString() { - return "User{" + - "name='" + name + '\'' + - ", age=" + age + - '}'; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/resources/bootstrap.yml deleted file mode 100644 index ff4805761..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-callee-service2/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,14 +0,0 @@ -server: - port: 48082 -spring: - application: - name: RouterCalleeService - cloud: - tencent: - metadata: - content: - label1: value2 - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/pom.xml b/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/pom.xml deleted file mode 100644 index 2c4a25100..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - polaris-router-example - com.tencent.cloud - ${revision} - ../pom.xml - - 4.0.0 - - router-caller-service - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-discovery - - - - com.tencent.cloud - spring-cloud-starter-tencent-polaris-router - - - - org.springframework.retry - spring-retry - 1.3.1 - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-actuator - - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - - com.google.code.gson - gson - 2.9.0 - - - - - - - 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/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/CustomSpringWebRouterLabelResolver.java b/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/CustomSpringWebRouterLabelResolver.java deleted file mode 100644 index c0a84bf5f..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/CustomSpringWebRouterLabelResolver.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import com.google.gson.Gson; -import com.tencent.cloud.polaris.router.spi.SpringWebRouterLabelResolver; - -import org.springframework.http.HttpRequest; -import org.springframework.stereotype.Component; - -/** - * Custom router label resolver for spring web request. - * @author lepdou 2022-07-20 - */ -@Component -public class CustomSpringWebRouterLabelResolver implements SpringWebRouterLabelResolver { - private final Gson gson = new Gson(); - - @Override - public int getOrder() { - return 0; - } - - @Override - public Map resolve(HttpRequest request, byte[] body, Set expressionLabelKeys) { - Map labels = new HashMap<>(); - User user = gson.fromJson(new String(body), User.class); - - labels.put("user", user.getName()); - return labels; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeService.java b/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeService.java deleted file mode 100644 index d8f7df0ff..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCalleeService.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestParam; - -/** - * Router callee feign client. - * - * @author lepdou 2022-04-06 - */ -@FeignClient("RouterCalleeService") -public interface RouterCalleeService { - - @PostMapping("/router/service/callee/info") - String info(@RequestParam("name") String name, @RequestBody User user); -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCallerApplication.java b/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCallerApplication.java deleted file mode 100644 index a3b05e6fd..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCallerApplication.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.cloud.client.loadbalancer.LoadBalanced; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Bean; -import org.springframework.web.client.RestTemplate; - -/** - * Router caller application. - * - * @author lepdou 2022-04-06 - */ -@SpringBootApplication -@EnableDiscoveryClient -@EnableFeignClients -public class RouterCallerApplication { - - public static void main(String[] args) { - SpringApplication.run(RouterCallerApplication.class, args); - } - - @Bean - @LoadBalanced - public RestTemplate restTemplate() { - return new RestTemplate(); - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCallerController.java b/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCallerController.java deleted file mode 100644 index f296393a0..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/RouterCallerController.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.RestTemplate; - -/** - * Discovery caller controller. - * - * @author lepdou 2022-04-06 - */ -@RestController -@RequestMapping("/router/service/caller") -public class RouterCallerController { - - @Autowired - private RestTemplate restTemplate; - - @Autowired - private RouterCalleeService routerCalleeService; - - /** - * Get info of two value. - * @return info - */ - @GetMapping("/feign") - public String feign(@RequestParam String name) { - User user = new User(); - user.setName(name); - user.setAge(18); - return routerCalleeService.info(name, user); - } - - /** - * Get information of callee. - * @return information of callee - */ - @GetMapping("/rest") - public String rest(@RequestParam String name) { - User user = new User(); - user.setName(name); - user.setAge(18); - return restTemplate.postForObject( - "http://RouterCalleeService/router/service/callee/info?name={name}", user, String.class, name); - } - - /** - * health check. - * @return health check info - */ - @GetMapping("/healthCheck") - public String healthCheck() { - return "pk ok"; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/User.java b/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/User.java deleted file mode 100644 index f68c6fff4..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/User.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. - * - * Copyright (C) 2019 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.example; - -/** - * demo object. - * @author lepdou 2022-05-12 - */ -public class User { - - private String name; - private int age; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } -} diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/resources/bootstrap.yml deleted file mode 100644 index 8a2ef8e34..000000000 --- a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,28 +0,0 @@ -server: - port: 48083 -spring: - application: - name: RouterCallerService - cloud: - tencent: - metadata: - content: - k1: v1 - rpc-enhancement: - reporter: - enabled: true - polaris: - address: grpc://119.91.66.223:8091 - namespace: default - enabled: true - loadbalancer: - enabled: true - stat: - enabled: true - port: 28081 -management: - endpoints: - web: - exposure: - include: - - polaris-router diff --git a/spring-cloud-tencent-examples/pom.xml b/spring-cloud-tencent-examples/pom.xml index c4ab03a30..c7e0c5a94 100644 --- a/spring-cloud-tencent-examples/pom.xml +++ b/spring-cloud-tencent-examples/pom.xml @@ -17,12 +17,6 @@ multiple-discovery-example - polaris-discovery-example - polaris-ratelimit-example - polaris-circuitbreaker-example - polaris-gateway-example - polaris-config-example - polaris-router-example metadata-transfer-example polaris-router-grayrelease-example polaris-router-featureenv-example 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 24e580e18..ce6588118 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 @@ -23,6 +23,11 @@ org.springframework.boot spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-actuator + diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java index eecf3291f..96cdacea2 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java @@ -17,16 +17,24 @@ package com.tencent.cloud.quickstart.callee; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; + +import com.tencent.cloud.common.constant.MetadataConstant; +import com.tencent.cloud.quickstart.callee.config.DataSourceProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import static com.tencent.cloud.common.constant.ContextConstant.UTF_8; + /** * Quickstart callee controller. * @@ -41,7 +49,10 @@ public class QuickstartCalleeController { @Value("${server.port:0}") private int port; - @Value("${appName:Callee}") + @Value("${spring.cloud.client.ip-address:127.0.0.1}") + private String ip; + + @Value("${appName:${spring.application.name}}") private String appName; @Autowired @@ -55,7 +66,7 @@ public class QuickstartCalleeController { */ @GetMapping("/sum") public int sum(@RequestParam int value1, @RequestParam int value2) { - LOG.info("Quickstart Callee Service is called and sum is {}.", value1 + value2); + LOG.info("Quickstart Callee Service [{}:{}] is called and sum is [{}].", ip, port, value1 + value2); return value1 + value2; } @@ -65,8 +76,23 @@ public class QuickstartCalleeController { */ @GetMapping("/info") public String info() { - LOG.info("Quickstart [{}] Service [{}] is called. datasource = {}", appName, port, dataSourceProperties); - return String.format("Quickstart [%s] Service [%s] is called. datasource = [%s]", appName, port, dataSourceProperties); + LOG.info("Quickstart [{}] Service [{}:{}] is called. datasource = [{}].", appName, ip, port, dataSourceProperties); + return String.format("Quickstart [%s] Service [%s:%s] is called. datasource = [%s].", appName, ip, port, dataSourceProperties); + } + + /** + * Get metadata in HTTP header. + * + * @param metadataStr metadata string + * @return metadata in HTTP header + * @throws UnsupportedEncodingException encoding exception + */ + @RequestMapping("/echo") + public String echoHeader(@RequestHeader(MetadataConstant.HeaderName.CUSTOM_METADATA) String metadataStr) + throws UnsupportedEncodingException { + LOG.info(URLDecoder.decode(metadataStr, UTF_8)); + metadataStr = URLDecoder.decode(metadataStr, UTF_8); + return metadataStr; } /** @@ -76,7 +102,7 @@ public class QuickstartCalleeController { */ @GetMapping("/circuitBreak") public String circuitBreak() { - LOG.info("Quickstart Callee Service is called right."); - return "Quickstart Callee Service is called right."; + LOG.info("Quickstart Callee Service [{}:{}] is called right.", ip, port); + return String.format("Quickstart Callee Service [%s:%s] is called right.", ip, port); } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/CustomConfigChangeListener.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java similarity index 84% rename from spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/CustomConfigChangeListener.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java index 0bcfb554a..bd2b1295b 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/CustomConfigChangeListener.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java @@ -15,12 +15,14 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.quickstart.callee; +package com.tencent.cloud.quickstart.callee.config; import java.util.Set; import com.tencent.cloud.polaris.config.annotation.PolarisConfigKVFileChangeListener; import com.tencent.cloud.polaris.config.listener.ConfigChangeEvent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; @@ -32,6 +34,8 @@ import org.springframework.stereotype.Component; @Component public final class CustomConfigChangeListener { + private static final Logger LOG = LoggerFactory.getLogger(CustomConfigChangeListener.class); + /** * PolarisConfigKVFileChangeListener Example . * @param event instance of {@link ConfigChangeEvent} @@ -41,8 +45,7 @@ public final class CustomConfigChangeListener { Set changedKeys = event.changedKeys(); for (String changedKey : changedKeys) { - System.out.printf("%s = %s \n", changedKey, event.getChange(changedKey)); + LOG.info("{} = {}", changedKey, event.getChange(changedKey)); } } - } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/DataSourceProperties.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java similarity index 96% rename from spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/DataSourceProperties.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java index e676cda9c..00ac67172 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/DataSourceProperties.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.quickstart.callee; +package com.tencent.cloud.quickstart.callee.config; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/CustomLabelResolver.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolver.java similarity index 68% rename from spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/CustomLabelResolver.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolver.java index 06ff020a2..cdd4b97e0 100644 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/CustomLabelResolver.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolver.java @@ -16,7 +16,7 @@ * */ -package com.tencent.cloud.ratelimit.example.service.callee; +package com.tencent.cloud.quickstart.callee.ratelimit; import java.util.HashMap; import java.util.Map; @@ -24,7 +24,10 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import com.tencent.cloud.polaris.ratelimit.spi.PolarisRateLimiterLabelServletResolver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; /** @@ -34,14 +37,27 @@ import org.springframework.stereotype.Component; */ @Component public class CustomLabelResolver implements PolarisRateLimiterLabelServletResolver { + private static final Logger LOG = LoggerFactory.getLogger(CustomLabelResolver.class); + + @Value("${label.key-value:}") + private String[] keyValues; @Override public Map resolve(HttpServletRequest request) { // rate limit by some request params. such as query params, headers .. + return getLabels(keyValues); + } + + private Map getLabels(String[] keyValues) { Map labels = new HashMap<>(); - labels.put("user", "zhangsan"); + for (String kv : keyValues) { + String key = kv.substring(0, kv.indexOf(":")); + String value = kv.substring(kv.indexOf(":") + 1); + labels.put(key, value); + } + LOG.info("Current labels:{}", labels); return labels; } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/resources/bootstrap.yml index 9acadf522..bf4d56b8f 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/resources/bootstrap.yml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/resources/bootstrap.yml @@ -11,6 +11,16 @@ spring: discovery: enabled: true register: true + contract: + exposure: true + report: + enabled: false + stat: + enabled: true + port: 28083 + # pushgateway: + # enabled: true + # address: 127.0.0.1:9091 config: address: grpc://119.91.66.223:8093 auto-refresh: true @@ -19,8 +29,20 @@ spring: files: [ "config/callee.properties" ] ratelimit: enabled: true + rejectRequestTipsFilePath: reject-tips.html maxQueuingTime: 500 tencent: metadata: content: + label1: value1 region: huanan +management: + endpoints: + web: + exposure: + include: + - polaris-discovery + - polaris-ratelimit + - polaris-config +label: + key-value: user:zhangsan diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/resources/reject-tips.html b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/resources/reject-tips.html similarity index 100% rename from spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/resources/reject-tips.html rename to spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/resources/reject-tips.html 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 e25650591..0f3495e9e 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 @@ -23,6 +23,11 @@ org.springframework.boot spring-boot-starter-webflux + + + org.springframework.boot + spring-boot-starter-actuator + diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java index 0baf9e208..86df17d59 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java @@ -17,18 +17,26 @@ package com.tencent.cloud.quickstart.callee; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; + +import com.tencent.cloud.common.constant.MetadataConstant; +import com.tencent.cloud.quickstart.callee.config.DataSourceProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; +import static com.tencent.cloud.common.constant.ContextConstant.UTF_8; + /** * Quickstart callee controller. * @@ -43,11 +51,16 @@ public class QuickstartCalleeController { @Value("${server.port:0}") private int port; - @Value("${appName:Callee}") + @Value("${spring.cloud.client.ip-address:127.0.0.1}") + private String ip; + + @Value("${appName:${spring.application.name}}") private String appName; @Autowired private DataSourceProperties dataSourceProperties; + private boolean ifBadGateway = true; + private boolean ifDelay = true; /** * Get sum of two value. @@ -57,7 +70,7 @@ public class QuickstartCalleeController { */ @GetMapping("/sum") public int sum(@RequestParam int value1, @RequestParam int value2) { - LOG.info("Quickstart Callee Service is called and sum is {}.", value1 + value2); + LOG.info("Quickstart Callee Service [{}:{}] is called and sum is [{}].", ip, port, value1 + value2); return value1 + value2; } @@ -67,8 +80,23 @@ public class QuickstartCalleeController { */ @GetMapping("/info") public String info() { - LOG.info("Quickstart [{}] Service [{}] is called. datasource = {}", appName, port, dataSourceProperties); - return String.format("Quickstart [%s] Service [%s] is called. datasource = [%s]", appName, port, dataSourceProperties); + LOG.info("Quickstart [{}] Service [{}:{}] is called. datasource = [{}].", appName, ip, port, dataSourceProperties); + return String.format("Quickstart [%s] Service [%s:%s] is called. datasource = [%s].", appName, ip, port, dataSourceProperties); + } + + /** + * Get metadata in HTTP header. + * + * @param metadataStr metadata string + * @return metadata in HTTP header + * @throws UnsupportedEncodingException encoding exception + */ + @RequestMapping("/echo") + public String echoHeader(@RequestHeader(MetadataConstant.HeaderName.CUSTOM_METADATA) String metadataStr) + throws UnsupportedEncodingException { + LOG.info(URLDecoder.decode(metadataStr, UTF_8)); + metadataStr = URLDecoder.decode(metadataStr, UTF_8); + return metadataStr; } /** @@ -77,9 +105,36 @@ public class QuickstartCalleeController { * @return circuit break info */ @GetMapping("/circuitBreak") - @ResponseStatus(value = HttpStatus.BAD_GATEWAY, reason = "failed for call quickstart callee service") - public String circuitBreak() { - LOG.info("Quickstart Callee Service [{}] is called wrong.", port); - return String.format("Quickstart Callee Service [%s] is called wrong.", port); + public ResponseEntity circuitBreak() throws InterruptedException { + if (ifBadGateway) { + return new ResponseEntity<>("failed for call quickstart callee service.", HttpStatus.BAD_GATEWAY); + } + if (ifDelay) { + Thread.sleep(100); + } + LOG.info("Quickstart Callee Service [{}:{}] is called wrong.", ip, port); + return new ResponseEntity<>(String.format("Quickstart Callee Service [%s:%s] is called wrong.", ip, port), HttpStatus.OK); + } + + @GetMapping("/setBadGateway") + public void setBadGateway(@RequestParam boolean param) { + if (param) { + LOG.info("info is set to return HttpStatus.BAD_GATEWAY."); + } + else { + LOG.info("info is set to return HttpStatus.OK."); + } + this.ifBadGateway = param; + } + + @GetMapping("/setDelay") + public void setDelay(@RequestParam boolean param) { + if (param) { + LOG.info("info is set to delay 100ms."); + } + else { + LOG.info("info is set to no delay."); + } + this.ifDelay = param; } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/CustomConfigChangeListener.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java similarity index 84% rename from spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/CustomConfigChangeListener.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java index cf2e92017..bd2b1295b 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/CustomConfigChangeListener.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java @@ -15,12 +15,14 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.quickstart.callee; +package com.tencent.cloud.quickstart.callee.config; import java.util.Set; import com.tencent.cloud.polaris.config.annotation.PolarisConfigKVFileChangeListener; import com.tencent.cloud.polaris.config.listener.ConfigChangeEvent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; @@ -32,6 +34,8 @@ import org.springframework.stereotype.Component; @Component public final class CustomConfigChangeListener { + private static final Logger LOG = LoggerFactory.getLogger(CustomConfigChangeListener.class); + /** * PolarisConfigKVFileChangeListener Example . * @param event instance of {@link ConfigChangeEvent} @@ -41,7 +45,7 @@ public final class CustomConfigChangeListener { Set changedKeys = event.changedKeys(); for (String changedKey : changedKeys) { - System.out.printf("%s = %s \n", changedKey, event.getChange(changedKey)); + LOG.info("{} = {}", changedKey, event.getChange(changedKey)); } } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/DataSourceProperties.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java similarity index 92% rename from spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/DataSourceProperties.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java index a0c6b7922..00ac67172 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/DataSourceProperties.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.quickstart.callee; +package com.tencent.cloud.quickstart.callee.config; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @@ -59,7 +59,7 @@ public class DataSourceProperties { @Override public String toString() { return "jdbcUrl='" + jdbcUrl + '\'' + - ", username='" + username + '\'' + - ", password='" + password + '\''; + ", username='" + username + '\'' + + ", password='" + password + '\''; } } diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/CustomLabelResolverReactive.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolverReactive.java similarity index 68% rename from spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/CustomLabelResolverReactive.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolverReactive.java index eb6e01b03..4a270fc62 100644 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/CustomLabelResolverReactive.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolverReactive.java @@ -15,13 +15,16 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.ratelimit.example.service.callee; +package com.tencent.cloud.quickstart.callee.ratelimit; import java.util.HashMap; import java.util.Map; import com.tencent.cloud.polaris.ratelimit.spi.PolarisRateLimiterLabelReactiveResolver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.server.ServerWebExchange; @@ -32,13 +35,26 @@ import org.springframework.web.server.ServerWebExchange; */ @Component public class CustomLabelResolverReactive implements PolarisRateLimiterLabelReactiveResolver { + private static final Logger LOG = LoggerFactory.getLogger(CustomLabelResolverReactive.class); + + @Value("${label.key-value:}") + private String[] keyValues; + @Override public Map resolve(ServerWebExchange exchange) { // rate limit by some request params. such as query params, headers .. + return getLabels(keyValues); + } + private Map getLabels(String[] keyValues) { Map labels = new HashMap<>(); - labels.put("user", "zhangsan"); + for (String kv : keyValues) { + String key = kv.substring(0, kv.indexOf(":")); + String value = kv.substring(kv.indexOf(":") + 1); + labels.put(key, value); + } + LOG.info("Current labels:{}", labels); return labels; } } diff --git a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/JsonPolarisRateLimiterLimitedFallback.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/JsonPolarisRateLimiterLimitedFallback.java similarity index 95% rename from spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/JsonPolarisRateLimiterLimitedFallback.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/JsonPolarisRateLimiterLimitedFallback.java index c6979728b..9c8712870 100644 --- a/spring-cloud-tencent-examples/polaris-ratelimit-example/ratelimit-callee-service/src/main/java/com/tencent/cloud/ratelimit/example/service/callee/JsonPolarisRateLimiterLimitedFallback.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/JsonPolarisRateLimiterLimitedFallback.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.ratelimit.example.service.callee; +package com.tencent.cloud.quickstart.callee.ratelimit; import com.tencent.cloud.polaris.ratelimit.spi.PolarisRateLimiterLimitedFallback; diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/resources/bootstrap.yml index 467fc5a00..b5c7ec0bf 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/resources/bootstrap.yml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/resources/bootstrap.yml @@ -11,6 +11,16 @@ spring: discovery: enabled: true register: true + contract: + exposure: true + report: + enabled: false + stat: + enabled: true + port: 28084 + # pushgateway: + # enabled: true + # address: 127.0.0.1:9091 config: address: grpc://119.91.66.223:8093 auto-refresh: true @@ -23,4 +33,15 @@ spring: tencent: metadata: content: + label1: value2 region: huanan +management: + endpoints: + web: + exposure: + include: + - polaris-discovery + - polaris-ratelimit + - polaris-config +label: + key-value: user2:lisi 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 1fd0f5f53..cc72331c6 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 @@ -23,6 +23,21 @@ org.springframework.boot spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-webflux + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + + org.springframework.boot + spring-boot-starter-actuator + diff --git a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCalleeServiceFallback.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java similarity index 75% rename from spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCalleeServiceFallback.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java index 3b78eb3bc..002ad99a0 100644 --- a/spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/java/com/tencent/cloud/polaris/discovery/service/caller/DiscoveryCalleeServiceFallback.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java @@ -13,22 +13,23 @@ * 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.discovery.service.caller; +package com.tencent.cloud.quickstart.caller; + +import com.tencent.cloud.common.spi.InstanceMetadataProvider; import org.springframework.stereotype.Component; /** - * Discovery callee feign client fallback. - * - * @author Haotian Zhang + *@author lepdou 2022-06-29 */ @Component -public class DiscoveryCalleeServiceFallback implements DiscoveryCalleeService { +public class CustomMetadataProvider implements InstanceMetadataProvider { @Override - public int sum(int value1, int value2) { - return 0; + public String getRegion() { + return "huadong"; } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java index 16486dfc9..58d4cc650 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java @@ -38,12 +38,4 @@ public interface QuickstartCalleeService { */ @GetMapping("/quickstart/callee/sum") int sum(@RequestParam("value1") int value1, @RequestParam("value2") int value2); - - /** - * Check circuit break. - * - * @return circuit break info - */ - @GetMapping("/quickstart/callee/circuitBreak") - String circuitBreak(); } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java index 546e503aa..1c806faac 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java @@ -31,9 +31,4 @@ public class QuickstartCalleeServiceFallback implements QuickstartCalleeService public int sum(int value1, int value2) { return 0; } - - @Override - public String circuitBreak() { - return "An exception occurred in the service call and fallback"; - } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java index 904a2a501..26fcb7eee 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java @@ -17,12 +17,17 @@ package com.tencent.cloud.quickstart.caller; +import com.tencent.cloud.polaris.circuitbreaker.resttemplate.PolarisCircuitBreaker; +import com.tencent.cloud.quickstart.caller.circuitbreaker.CustomFallback; + import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.context.annotation.Bean; import org.springframework.web.client.RestTemplate; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.util.DefaultUriBuilderFactory; /** * Quickstart caller application. @@ -42,4 +47,39 @@ public class QuickstartCallerApplication { public RestTemplate restTemplate() { return new RestTemplate(); } + + @Bean + @LoadBalanced + public RestTemplate defaultRestTemplate() { + DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory("http://QuickstartCalleeService"); + RestTemplate restTemplate = new RestTemplate(); + restTemplate.setUriTemplateHandler(uriBuilderFactory); + return restTemplate; + } + + @Bean + @LoadBalanced + @PolarisCircuitBreaker + public RestTemplate restTemplateFallbackFromPolaris() { + DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory("http://QuickstartCalleeService"); + RestTemplate restTemplate = new RestTemplate(); + restTemplate.setUriTemplateHandler(uriBuilderFactory); + return restTemplate; + } + + @Bean + @LoadBalanced + @PolarisCircuitBreaker(fallbackClass = CustomFallback.class) + public RestTemplate restTemplateFallbackFromCode() { + DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory("http://QuickstartCalleeService"); + RestTemplate restTemplate = new RestTemplate(); + restTemplate.setUriTemplateHandler(uriBuilderFactory); + return restTemplate; + } + + @LoadBalanced + @Bean + WebClient.Builder webClientBuilder() { + return WebClient.builder().baseUrl("http://QuickstartCalleeService"); + } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java index 40b1233ab..a0c17faa2 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java @@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import reactor.core.publisher.Mono; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -32,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; +import org.springframework.web.reactive.function.client.WebClient; /** * Quickstart caller controller. @@ -43,11 +45,16 @@ import org.springframework.web.client.RestTemplate; public class QuickstartCallerController { private static final Logger LOG = LoggerFactory.getLogger(QuickstartCallerController.class); + @Autowired private RestTemplate restTemplate; + @Autowired private QuickstartCalleeService quickstartCalleeService; + @Autowired + private WebClient.Builder webClientBuilder; + /** * Get sum of two value. * @param value1 value 1 @@ -72,9 +79,14 @@ public class QuickstartCallerController { * Get information of callee. * @return information of callee */ - @GetMapping("/circuitBreak") - public String circuitBreak() { - return quickstartCalleeService.circuitBreak(); + @GetMapping("/webclient") + public Mono webclient() { + return webClientBuilder + .build() + .get() + .uri("/quickstart/callee/echo") + .retrieve() + .bodyToMono(String.class); } /** @@ -150,8 +162,8 @@ public class QuickstartCallerController { } /** - * Get information of callee. - * @return information of callee + * Get information of caller. + * @return information of caller */ @GetMapping("/info") public String info() { diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java new file mode 100644 index 000000000..4d902aaa2 --- /dev/null +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java @@ -0,0 +1,136 @@ +/* + * Tencent is pleased to support the open source community by making Spring Cloud Tencent available. + * + * Copyright (C) 2019 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.quickstart.caller.circuitbreaker; + +import reactor.core.publisher.Mono; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.cloud.client.circuitbreaker.CircuitBreakerFactory; +import org.springframework.cloud.client.circuitbreaker.ReactiveCircuitBreakerFactory; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.reactive.function.client.WebClient; + +/** + * Controller for circuit breaker. + * + * @author Haotian Zhang + */ +@RestController +@RequestMapping("/quickstart/caller/circuitBreak") +public class CircuitBreakerController { + + @Autowired + private CircuitBreakerQuickstartCalleeService circuitBreakerQuickstartCalleeService; + + @Autowired + private CircuitBreakerQuickstartCalleeServiceWithFallback circuitBreakerQuickstartCalleeServiceWithFallback; + + @Autowired + @Qualifier("defaultRestTemplate") + private RestTemplate defaultRestTemplate; + + @Autowired + @Qualifier("restTemplateFallbackFromPolaris") + private RestTemplate restTemplateFallbackFromPolaris; + + @Autowired + @Qualifier("restTemplateFallbackFromCode") + private RestTemplate restTemplateFallbackFromCode; + + @Autowired + private CircuitBreakerFactory circuitBreakerFactory; + + @Autowired + private ReactiveCircuitBreakerFactory reactiveCircuitBreakerFactory; + + @Autowired + private WebClient.Builder webClientBuilder; + + /** + * Feign circuit breaker with fallback from Polaris. + * @return circuit breaker information of callee + */ + @GetMapping("/feign/fallbackFromPolaris") + public String circuitBreakFeignFallbackFromPolaris() { + return circuitBreakerQuickstartCalleeService.circuitBreak(); + } + + /** + * Feign circuit breaker with fallback from Polaris. + * @return circuit breaker information of callee + */ + @GetMapping("/feign/fallbackFromCode") + public String circuitBreakFeignFallbackFromCode() { + return circuitBreakerQuickstartCalleeServiceWithFallback.circuitBreak(); + } + + /** + * RestTemplate circuit breaker. + * @return circuit breaker information of callee + */ + @GetMapping("/rest") + public String circuitBreakRestTemplate() { + return circuitBreakerFactory + .create("QuickstartCalleeService#/quickstart/callee/circuitBreak") + .run(() -> defaultRestTemplate.getForObject("/quickstart/callee/circuitBreak", String.class), + throwable -> "trigger the refuse for service callee." + ); + } + + /** + * RestTemplate circuit breaker with fallback from Polaris. + * @return circuit breaker information of callee + */ + @GetMapping("/rest/fallbackFromPolaris") + public ResponseEntity circuitBreakRestTemplateFallbackFromPolaris() { + return restTemplateFallbackFromPolaris.getForEntity("/quickstart/callee/circuitBreak", String.class); + } + + /** + * RestTemplate circuit breaker with fallback from code. + * @return circuit breaker information of callee + */ + @GetMapping("/rest/fallbackFromCode") + public ResponseEntity circuitBreakRestTemplateFallbackFromCode() { + return restTemplateFallbackFromCode.getForEntity("/quickstart/callee/circuitBreak", String.class); + } + + /** + * Get information of callee. + * @return information of callee + */ + @GetMapping("/webclient") + public Mono webclient() { + return webClientBuilder + .build() + .get() + .uri("/quickstart/callee/circuitBreak") + .retrieve() + .bodyToMono(String.class) + .transform(it -> + reactiveCircuitBreakerFactory + .create("QuickstartCalleeService#/quickstart/callee/circuitBreak") + .run(it, throwable -> Mono.just("fallback: trigger the refuse for service callee")) + ); + } +} diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderB.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java similarity index 74% rename from spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderB.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java index 63dbbdb17..64821b9a9 100644 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderB.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.polaris.circuitbreaker.feign.example; +package com.tencent.cloud.quickstart.caller.circuitbreaker; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; @@ -25,14 +25,14 @@ import org.springframework.web.bind.annotation.GetMapping; * * @author sean yu */ -@FeignClient(name = "polaris-circuitbreaker-callee-service", contextId = "fallback-from-polaris") -public interface ProviderB { +@FeignClient(name = "QuickstartCalleeService", contextId = "fallback-from-polaris") +public interface CircuitBreakerQuickstartCalleeService { /** - * Get info of service B. + * Check circuit break. * - * @return info of service B + * @return circuit break info */ - @GetMapping("/example/service/b/info") - String info(); + @GetMapping("/quickstart/callee/circuitBreak") + String circuitBreak(); } diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderBFallback.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java similarity index 76% rename from spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderBFallback.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java index 419b18cfc..06a2df366 100644 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderBFallback.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.polaris.circuitbreaker.feign.example; +package com.tencent.cloud.quickstart.caller.circuitbreaker; import org.springframework.stereotype.Component; @@ -25,10 +25,10 @@ import org.springframework.stereotype.Component; * @author sean yu */ @Component -public class ProviderBFallback implements ProviderBWithFallback { +public class CircuitBreakerQuickstartCalleeServiceFallback implements CircuitBreakerQuickstartCalleeServiceWithFallback { @Override - public String info() { - return "fallback: trigger the refuse for service b"; + public String circuitBreak() { + return "fallback: trigger the refuse for service callee."; } } diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderBWithFallback.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java similarity index 66% rename from spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderBWithFallback.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java index 194ac1305..f71a7650e 100644 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-feign-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/feign/example/ProviderBWithFallback.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java @@ -15,25 +15,24 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.polaris.circuitbreaker.feign.example; +package com.tencent.cloud.quickstart.caller.circuitbreaker; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; /** - * ProviderBWithFallback. + * CircuitBreakerQuickstartCalleeServiceWithFallback. * * @author sean yu */ -@FeignClient(name = "polaris-circuitbreaker-callee-service", contextId = "fallback-from-code", fallback = ProviderBFallback.class) -public interface ProviderBWithFallback { +@FeignClient(name = "QuickstartCalleeService", contextId = "fallback-from-code", fallback = CircuitBreakerQuickstartCalleeServiceFallback.class) +public interface CircuitBreakerQuickstartCalleeServiceWithFallback { /** - * Get info of service B. + * Check circuit break. * - * @return info of service B + * @return circuit break info */ - @GetMapping("/example/service/b/info") - String info(); - + @GetMapping("/quickstart/callee/circuitBreak") + String circuitBreak(); } diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/CustomFallback.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CustomFallback.java similarity index 95% rename from spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/CustomFallback.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CustomFallback.java index a7f5f1a65..887d690d9 100644 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/resttemplate/example/CustomFallback.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CustomFallback.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.polaris.circuitbreaker.resttemplate.example; +package com.tencent.cloud.quickstart.caller.circuitbreaker; import java.util.HashMap; diff --git a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/CustomRouterLabelResolver.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/router/CustomRouterLabelResolver.java similarity index 89% rename from spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/CustomRouterLabelResolver.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/router/CustomRouterLabelResolver.java index be9b010ea..18f3d0cac 100644 --- a/spring-cloud-tencent-examples/polaris-router-example/router-caller-service/src/main/java/com/tencent/cloud/polaris/router/example/CustomRouterLabelResolver.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/router/CustomRouterLabelResolver.java @@ -16,7 +16,7 @@ * */ -package com.tencent.cloud.polaris.router.example; +package com.tencent.cloud.quickstart.caller.router; import java.util.HashMap; import java.util.Map; @@ -42,9 +42,7 @@ public class CustomRouterLabelResolver implements FeignRouterLabelResolver { public Map resolve(RequestTemplate requestTemplate, Set expressionLabelKeys) { Map labels = new HashMap<>(); - User user = gson.fromJson(new String(requestTemplate.body()), User.class); - - labels.put("user", user.getName()); + labels.put("label1", "value1"); return labels; } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/resources/bootstrap.yml index d2d1347f4..b51cbdec5 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/resources/bootstrap.yml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/resources/bootstrap.yml @@ -14,11 +14,15 @@ spring: heartbeat: enabled: true health-check-url: /quickstart/caller/healthCheck + contract: + exposure: true + report: + enabled: false circuitbreaker: enabled: true stat: enabled: true - port: 28081 + port: 28082 # pushgateway: # enabled: true # address: 127.0.0.1:9091 @@ -39,3 +43,4 @@ management: exposure: include: - polaris-discovery + - polaris-circuit-breaker diff --git a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/gateway/example/FallbackController.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/java/com/tencent/cloud/quickstart/gateway/FallbackController.java similarity index 88% rename from spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/gateway/example/FallbackController.java rename to spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/java/com/tencent/cloud/quickstart/gateway/FallbackController.java index c0d964b56..16dcc0ade 100644 --- a/spring-cloud-tencent-examples/polaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/src/main/java/com/tencent/cloud/polaris/circuitbreaker/gateway/example/FallbackController.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/java/com/tencent/cloud/quickstart/gateway/FallbackController.java @@ -15,7 +15,7 @@ * specific language governing permissions and limitations under the License. */ -package com.tencent.cloud.polaris.circuitbreaker.gateway.example; +package com.tencent.cloud.quickstart.gateway; import reactor.core.publisher.Mono; @@ -32,6 +32,6 @@ public class FallbackController { @GetMapping("/polaris-fallback") Mono getFallback() { - return Mono.just("fallback: trigger the refuse for service b"); + return Mono.just("fallback: trigger the refuse for service caller."); } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/bootstrap.yml index 2f0b00cc2..0db7fd89a 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/bootstrap.yml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/bootstrap.yml @@ -18,7 +18,33 @@ spring: address: grpc://119.91.66.223:8091 namespace: default enabled: true + contract: + exposure: true + report: + enabled: false + stat: + enabled: true + port: 28081 gateway: + discovery: + locator: + enabled: true + 'predicates[0]': + name: Path + args: + patterns: '''/'' + serviceId + ''/**''' + 'filters[0]': + name: RewritePath + args: + regexp: '''/'' + serviceId + ''/(?.*)''' + replacement: '''/$\{remaining}''' + 'filters[1]': + name: CircuitBreaker + args: + # statusCodes 缺省时会自动识别 "5**" 为错误 + # statusCodes: '''404,5**''' + # fallbackUri 缺省时会在熔断触发后拉取 plaris server 配置的降级作为 response + fallbackUri: '''forward:/polaris-fallback''' routes: - id: QuickstartCallerService uri: lb://QuickstartCallerService