From 4ab49d9bd17379000813d3ebee58eceb1599b18f Mon Sep 17 00:00:00 2001 From: fredrikliu <139424001+fredrikliu@users.noreply.github.com> Date: Fri, 10 May 2024 23:48:34 +0800 Subject: [PATCH] change examples (#170) Co-authored-by: fredrikliu --- .../consumer/src/main/resources/application.properties | 2 +- .../examples/alibaba/cloud/cloud/ProviderApplication.java | 6 +++++- .../provider/src/main/resources/application.properties | 2 +- .../cloud/interceptor/ConfigurationParserInterceptor.java | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/consumer/src/main/resources/application.properties b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/consumer/src/main/resources/application.properties index 12f01521..f8516b72 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/consumer/src/main/resources/application.properties +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/consumer/src/main/resources/application.properties @@ -1,5 +1,5 @@ server.port=65002 -spring.application.name=service-consumer +spring.application.name=service-consumer-quickstart-hotxon spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 spring.cloud.nacos.discovery.enabled=false spring.cloud.nacos.config.enabled=false \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/provider/src/main/java/cn/polarismesh/agent/examples/alibaba/cloud/cloud/ProviderApplication.java b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/provider/src/main/java/cn/polarismesh/agent/examples/alibaba/cloud/cloud/ProviderApplication.java index a765fc6f..8404c3b6 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/provider/src/main/java/cn/polarismesh/agent/examples/alibaba/cloud/cloud/ProviderApplication.java +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/provider/src/main/java/cn/polarismesh/agent/examples/alibaba/cloud/cloud/ProviderApplication.java @@ -46,13 +46,17 @@ public static class EchoController { @Value("${name:}") private String name; + @Value("${spring.cloud.tencent.metadata.content.env}") + private String env; + @GetMapping("/echo/{string}") public String echo(@PathVariable String string) { return "Hello, I'm provider, receive msg : " + string + ", my metadata : " + " name config : " - + name; + + name + + env; } } diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/provider/src/main/resources/application.properties b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/provider/src/main/resources/application.properties index 891a42d7..0a692e58 100644 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/provider/src/main/resources/application.properties +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/quickstart-examples/provider/src/main/resources/application.properties @@ -1,4 +1,4 @@ -server.port=65101 +server.port=65001 spring.application.name=service-provider-quickstart-hotxon spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 spring.cloud.nacos.discovery.enabled=false diff --git a/polaris-agent-plugins/spring-cloud-plugins/spring-cloud-hoxton-plugin/src/main/java/cn/polarismesh/agent/plugin/spring/cloud/interceptor/ConfigurationParserInterceptor.java b/polaris-agent-plugins/spring-cloud-plugins/spring-cloud-hoxton-plugin/src/main/java/cn/polarismesh/agent/plugin/spring/cloud/interceptor/ConfigurationParserInterceptor.java index df40ace3..b70de140 100644 --- a/polaris-agent-plugins/spring-cloud-plugins/spring-cloud-hoxton-plugin/src/main/java/cn/polarismesh/agent/plugin/spring/cloud/interceptor/ConfigurationParserInterceptor.java +++ b/polaris-agent-plugins/spring-cloud-plugins/spring-cloud-hoxton-plugin/src/main/java/cn/polarismesh/agent/plugin/spring/cloud/interceptor/ConfigurationParserInterceptor.java @@ -61,7 +61,7 @@ public ConfigurationParserInterceptor() { beanInjectors.add(new LosslessBeanInjector()); beanInjectors.add(new LoadbalancerBeanInjector()); beanInjectors.add(new RouterBeanInjector()); - // beanInjectors.add(new CircuitBreakerBeanInjector()); + beanInjectors.add(new CircuitBreakerBeanInjector()); beanInjectors.add(new RateLimitBeanInjector()); }