From 5b5a407407374c6b776ddc7e0b9fe4751fd3730d Mon Sep 17 00:00:00 2001 From: fredrikliu <139424001+fredrikliu@users.noreply.github.com> Date: Tue, 14 May 2024 16:49:22 +0800 Subject: [PATCH] fix circuitbreaker examples (#180) Co-authored-by: fredrikliu --- .../callee-service-a}/Dockerfile | 0 .../callee-service-a}/deployment.yaml | 12 ++--- .../callee-service-a}/pom.xml | 38 +++++++++++++-- .../quickstart/callee/CustomMetadata.java | 0 .../callee/QuickstartCalleeController.java | 0 .../callee/QuickstartCalleeServiceA.java | 0 .../config/CustomConfigChangeListener.java | 0 .../callee/config/DataSourceProperties.java | 0 .../callee/ratelimit/CustomLabelResolver.java | 0 .../src/main/resources/bootstrap.yml | 48 +++++++++++++++++++ .../src/main/resources/reject-tips.html | 0 .../callee-service-b}/Dockerfile | 0 .../callee-service-b}/deployment.yaml | 12 ++--- .../callee-service-b}/pom.xml | 28 +++++++++-- .../quickstart/callee/CustomMetadata.java | 0 .../callee/QuickstartCalleeController.java | 0 .../callee/QuickstartCalleeServiceB.java | 0 .../config/CustomConfigChangeListener.java | 0 .../callee/config/DataSourceProperties.java | 0 .../CustomLabelResolverReactive.java | 0 ...JsonPolarisRateLimiterLimitedFallback.java | 0 .../src/main/resources/bootstrap.yml | 47 ++++++++++++++++++ .../caller-service}/Dockerfile | 0 .../caller-service}/deployment.yaml | 2 +- .../caller-service}/pom.xml | 24 ++++++++-- .../caller/CustomMetadataProvider.java | 0 .../caller/QuickstartCalleeService.java | 0 .../QuickstartCalleeServiceFallback.java | 0 .../caller/QuickstartCallerApplication.java | 0 .../caller/QuickstartCallerController.java | 0 .../CircuitBreakerController.java | 0 ...CircuitBreakerQuickstartCalleeService.java | 0 ...reakerQuickstartCalleeServiceFallback.java | 0 ...erQuickstartCalleeServiceWithFallback.java | 0 .../caller/circuitbreaker/CustomFallback.java | 0 .../router/CustomRouterLabelResolver.java | 0 .../src/main/resources/bootstrap.yml | 2 +- .../circuitbreaker-examples/pom.xml | 27 +++++++++++ .../src/main/resources/bootstrap.yml | 48 ------------------- .../src/main/resources/bootstrap.yml | 47 ------------------ 40 files changed, 211 insertions(+), 124 deletions(-) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/Dockerfile (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/deployment.yaml (85%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/pom.xml (65%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceA.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolver.java (100%) create mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/resources/bootstrap.yml rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-a => circuitbreaker-examples/callee-service-a}/src/main/resources/reject-tips.html (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/Dockerfile (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/deployment.yaml (85%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/pom.xml (71%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceB.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolverReactive.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-callee-service-b => circuitbreaker-examples/callee-service-b}/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/JsonPolarisRateLimiterLimitedFallback.java (100%) create mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/resources/bootstrap.yml rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/Dockerfile (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/deployment.yaml (95%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/pom.xml (76%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CustomFallback.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/java/com/tencent/cloud/quickstart/caller/router/CustomRouterLabelResolver.java (100%) rename polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/{quickstart-examples/quickstart-caller-service => circuitbreaker-examples/caller-service}/src/main/resources/bootstrap.yml (96%) create mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/pom.xml delete mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/resources/bootstrap.yml delete mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/resources/bootstrap.yml diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/Dockerfile b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/Dockerfile similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/Dockerfile rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/Dockerfile diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/deployment.yaml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/deployment.yaml similarity index 85% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/deployment.yaml rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/deployment.yaml index 09bf138b..918c9608 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/deployment.yaml +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/deployment.yaml @@ -3,18 +3,18 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: hoxton-callee-a - name: hoxton-callee-a + app: hoxton-callee + name: hoxton-callee namespace: default spec: replicas: 1 selector: matchLabels: - app: hoxton-callee-a + app: hoxton-callee template: metadata: labels: - app: hoxton-callee-a + app: hoxton-callee annotations: polarismesh.cn/javaagent: "true" polarismesh.cn/javaagentVersion: "1.7.0-RC2" @@ -22,7 +22,7 @@ spec: polarismesh.cn/javaagentFrameworkVersion: "hoxton" spec: containers: - - image: polarismesh/polaris-javaagent-demo-sc-quickstart-hoxton-callee-a:1.7.0-java8 + - image: polarismesh/polaris-javaagent-demo-sc-quickstart-hoxton-callee:1.7.0-java8 imagePullPolicy: Always name: provider resources: @@ -34,7 +34,7 @@ spec: command: - /bin/bash - -c - - cd /app && java -Dserver.port=65007 -jar main.jar + - cd /app && java -Dserver.port=48083 -jar main.jar lifecycle: preStop: exec: diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/pom.xml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/pom.xml similarity index 65% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/pom.xml rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/pom.xml index 53056897..17b56ae7 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/pom.xml +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/pom.xml @@ -2,19 +2,37 @@ + 4.0.0 + - quickstart-example - com.tencent.cloud - 1.14.0-Hoxton.SR12-SNAPSHOT + org.springframework.boot + spring-boot-starter-parent + 2.3.7.RELEASE - 4.0.0 - quickstart-callee-service-a + + Hoxton.SR12 + 1.14.0-Hoxton.SR12-SNAPSHOT + 2.3.12.RELEASE + 1.7.30 + + + com.tencent.polaris + callee-service-a + jar + 1.7.0 Quickstart Callee Service A + + com.tencent.cloud + spring-cloud-tencent-dependencies + 1.14.0-Hoxton.SR12-SNAPSHOT + pom + import + com.alibaba.cloud spring-cloud-alibaba-dependencies @@ -45,6 +63,16 @@ 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/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceA.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceA.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceA.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceA.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolver.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolver.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolver.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolver.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/resources/bootstrap.yml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/resources/bootstrap.yml new file mode 100644 index 00000000..265a218b --- /dev/null +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/resources/bootstrap.yml @@ -0,0 +1,48 @@ +server: + port: 48083 +spring: + application: + name: QuickstartCalleeService +# cloud: +# polaris: +# address: grpc://127.0.0.1:8091 +# namespace: default +## enabled: true +# 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://127.0.0.1:8093 +# auto-refresh: true +# groups: +# - name: ${spring.application.name} +# 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/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/resources/reject-tips.html b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/resources/reject-tips.html similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/resources/reject-tips.html rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-a/src/main/resources/reject-tips.html diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/Dockerfile b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/Dockerfile similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/Dockerfile rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/Dockerfile diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/deployment.yaml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/deployment.yaml similarity index 85% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/deployment.yaml rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/deployment.yaml index 880fcdcf..1a2236e7 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/deployment.yaml +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/deployment.yaml @@ -3,18 +3,18 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: hoxton-callee-b - name: hoxton-callee-b + app: hoxton-callee-1 + name: hoxton-callee-1 namespace: default spec: replicas: 1 selector: matchLabels: - app: hoxton-callee-b + app: hoxton-callee-1 template: metadata: labels: - app: hoxton-callee-b + app: hoxton-callee-1 annotations: polarismesh.cn/javaagent: "true" polarismesh.cn/javaagentVersion: "1.7.0-RC2" @@ -22,7 +22,7 @@ spec: polarismesh.cn/javaagentFrameworkVersion: "hoxton" spec: containers: - - image: polarismesh/polaris-javaagent-demo-sc-quickstart-hoxton-callee-b:1.7.0-java8 + - image: polarismesh/polaris-javaagent-demo-sc-quickstart-hoxton-callee-1:1.7.0-java8 imagePullPolicy: Always name: provider resources: @@ -34,7 +34,7 @@ spec: command: - /bin/bash - -c - - cd /app && java -Dserver.port=65008 -jar main.jar + - cd /app && java -Dserver.port=48084 -jar main.jar lifecycle: preStop: exec: diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/pom.xml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/pom.xml similarity index 71% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/pom.xml rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/pom.xml index c8a195c3..aa63288c 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/pom.xml +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/pom.xml @@ -2,19 +2,37 @@ + 4.0.0 + - quickstart-example - com.tencent.cloud - 1.14.0-Hoxton.SR12-SNAPSHOT + org.springframework.boot + spring-boot-starter-parent + 2.3.7.RELEASE - 4.0.0 - quickstart-callee-service-b + + Hoxton.SR12 + 1.14.0-Hoxton.SR12-SNAPSHOT + 2.3.12.RELEASE + 1.7.30 + + + com.tencent.polaris + callee-service-b + jar + 1.7.0 Quickstart Callee Service B + + com.tencent.cloud + spring-cloud-tencent-dependencies + 1.14.0-Hoxton.SR12-SNAPSHOT + pom + import + com.alibaba.cloud spring-cloud-alibaba-dependencies diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/CustomMetadata.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceB.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceB.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceB.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeServiceB.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/CustomConfigChangeListener.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/config/DataSourceProperties.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolverReactive.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolverReactive.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolverReactive.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/CustomLabelResolverReactive.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/JsonPolarisRateLimiterLimitedFallback.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/JsonPolarisRateLimiterLimitedFallback.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/JsonPolarisRateLimiterLimitedFallback.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/ratelimit/JsonPolarisRateLimiterLimitedFallback.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/resources/bootstrap.yml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/resources/bootstrap.yml new file mode 100644 index 00000000..a5a38326 --- /dev/null +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/callee-service-b/src/main/resources/bootstrap.yml @@ -0,0 +1,47 @@ +server: + port: 48084 +spring: + application: + name: QuickstartCalleeService +# cloud: +# polaris: +# address: grpc://127.0.0.1:8091 +# namespace: default +# enabled: true +# 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://127.0.0.1:8093 +# auto-refresh: true +# groups: +# - name: ${spring.application.name} +# files: [ "config/callee.properties" ] +# ratelimit: +# enabled: true +# maxQueuingTime: 500 +# 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/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/Dockerfile b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/Dockerfile similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/Dockerfile rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/Dockerfile diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/deployment.yaml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/deployment.yaml similarity index 95% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/deployment.yaml rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/deployment.yaml index 3f4cb46b..4f0d28db 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/deployment.yaml +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/deployment.yaml @@ -34,7 +34,7 @@ spec: command: - /bin/bash - -c - - cd /app && java -Dserver.port=65008 -jar main.jar + - cd /app && java -Dserver.port=48082 -jar main.jar lifecycle: preStop: exec: diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/pom.xml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/pom.xml similarity index 76% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/pom.xml rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/pom.xml index faeb6317..726a8da3 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/pom.xml +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/pom.xml @@ -2,19 +2,33 @@ + 4.0.0 + - quickstart-example - com.tencent.cloud - 1.14.0-Hoxton.SR12-SNAPSHOT + org.springframework.boot + spring-boot-starter-parent + 2.3.7.RELEASE - 4.0.0 - quickstart-caller-service + caller-service Quickstart Caller Service + + Hoxton.SR12 + 1.14.0-Hoxton.SR12-SNAPSHOT + 2.3.12.RELEASE + 1.7.30 + + + com.tencent.cloud + spring-cloud-tencent-dependencies + 1.14.0-Hoxton.SR12-SNAPSHOT + pom + import + com.alibaba.cloud spring-cloud-alibaba-dependencies diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/CustomMetadataProvider.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerApplication.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerController.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeService.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceFallback.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CircuitBreakerQuickstartCalleeServiceWithFallback.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CustomFallback.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CustomFallback.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CustomFallback.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/circuitbreaker/CustomFallback.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/router/CustomRouterLabelResolver.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/router/CustomRouterLabelResolver.java similarity index 100% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/router/CustomRouterLabelResolver.java rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/java/com/tencent/cloud/quickstart/caller/router/CustomRouterLabelResolver.java diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/resources/bootstrap.yml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/resources/bootstrap.yml similarity index 96% rename from polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/resources/bootstrap.yml rename to polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/resources/bootstrap.yml index 58cfd4eb..cc2b878a 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-caller-service/src/main/resources/bootstrap.yml +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/caller-service/src/main/resources/bootstrap.yml @@ -5,7 +5,7 @@ spring: name: QuickstartCallerService cloud: polaris: - address: grpc://106.55.74.24:8091 + address: grpc://127.0.0.1:8091 namespace: default enabled: true discovery: diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/pom.xml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/pom.xml new file mode 100644 index 00000000..edb20a8b --- /dev/null +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/circuitbreaker-examples/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + com.tencent.polaris + spring-cloud-hoxton-examples + ${revision} + ../pom.xml + + + + 17 + 17 + UTF-8 + + + circuitbreaker-examples + pom + + caller-service + callee-service-a + callee-service-b + + + \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/resources/bootstrap.yml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/resources/bootstrap.yml deleted file mode 100644 index 7701d56e..00000000 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-a/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,48 +0,0 @@ -server: - port: 48083 -spring: - application: - name: QuickstartCalleeService - cloud: - polaris: - address: grpc://106.55.74.24:8091 - namespace: default - enabled: true - 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://106.55.74.24:8093 - auto-refresh: true - groups: - - name: ${spring.application.name} - 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/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/resources/bootstrap.yml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/resources/bootstrap.yml deleted file mode 100644 index 1c9a63ba..00000000 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/quickstart-callee-service-b/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,47 +0,0 @@ -server: - port: 48084 -spring: - application: - name: QuickstartCalleeService - cloud: - polaris: - address: grpc://106.55.74.24:8091 - namespace: default - enabled: true - 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://106.55.74.24:8093 - auto-refresh: true - groups: - - name: ${spring.application.name} - files: [ "config/callee.properties" ] - ratelimit: - enabled: true - maxQueuingTime: 500 - tencent: - metadata: - content: - label1: value2 - region: huanan -management: - endpoints: - web: - exposure: - include: - - polaris-discovery - - polaris-ratelimit - - polaris-config -label: - key-value: user2:lisi