From 967ae90fc7845704a1d56882302a67e0295e8f4a Mon Sep 17 00:00:00 2001 From: luyanbo Date: Fri, 17 Feb 2023 13:27:26 +0800 Subject: [PATCH] fix --- .../alibabacloud/mse/demo/a/service/HelloServiceAImpl.java | 4 ++-- .../alibabacloud/mse/demo/c/service/HelloServiceCImpl.java | 6 +++--- .../helm/mse-simple-demo/templates/nacos-server.yaml | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mse-simple-demo/A/src/main/java/com/alibabacloud/mse/demo/a/service/HelloServiceAImpl.java b/mse-simple-demo/A/src/main/java/com/alibabacloud/mse/demo/a/service/HelloServiceAImpl.java index d54ecb7a..3125ca00 100644 --- a/mse-simple-demo/A/src/main/java/com/alibabacloud/mse/demo/a/service/HelloServiceAImpl.java +++ b/mse-simple-demo/A/src/main/java/com/alibabacloud/mse/demo/a/service/HelloServiceAImpl.java @@ -17,11 +17,11 @@ public class HelloServiceAImpl implements HelloServiceA { private HelloServiceB helloServiceB; @Autowired - String servcieTag; + String serviceTag; @Override public String hello(String name) { - return "A" + servcieTag + "[" + inetUtils.findFirstNonLoopbackAddress().getHostAddress() + "]" + " -> " + + return "A" + serviceTag + "[" + inetUtils.findFirstNonLoopbackAddress().getHostAddress() + "]" + " -> " + helloServiceB.hello(name); } } diff --git a/mse-simple-demo/C/src/main/java/com/alibabacloud/mse/demo/c/service/HelloServiceCImpl.java b/mse-simple-demo/C/src/main/java/com/alibabacloud/mse/demo/c/service/HelloServiceCImpl.java index 5e76ef22..ecaee35d 100644 --- a/mse-simple-demo/C/src/main/java/com/alibabacloud/mse/demo/c/service/HelloServiceCImpl.java +++ b/mse-simple-demo/C/src/main/java/com/alibabacloud/mse/demo/c/service/HelloServiceCImpl.java @@ -27,7 +27,7 @@ public class HelloServiceCImpl implements HelloServiceC { private String topic; @Autowired - String servcieTag; + String serviceTag; @Value("${throwException:false}") boolean throwException; @@ -39,7 +39,7 @@ public String hello(String name) { throw new RuntimeException(); } - String value = "C" + servcieTag + "[" + inetUtils.findFirstNonLoopbackAddress().getHostAddress() + "]"; + String value = "C" + serviceTag + "[" + inetUtils.findFirstNonLoopbackAddress().getHostAddress() + "]"; String invokerTag=""; String userData = RpcContext.getContext().getAttachment("__microservice_tag__"); if (!StringUtils.isEmpty(userData)) { @@ -60,7 +60,7 @@ public String hello(String name) { @Override public String world(String name) { - return "C" + servcieTag + "[" + inetUtils.findFirstNonLoopbackAddress().getHostAddress() + "] -> " + name; + return "C" + serviceTag + "[" + inetUtils.findFirstNonLoopbackAddress().getHostAddress() + "] -> " + name; } } diff --git a/mse-simple-demo/helm/mse-simple-demo/templates/nacos-server.yaml b/mse-simple-demo/helm/mse-simple-demo/templates/nacos-server.yaml index 37f542c0..e63dcbdf 100644 --- a/mse-simple-demo/helm/mse-simple-demo/templates/nacos-server.yaml +++ b/mse-simple-demo/helm/mse-simple-demo/templates/nacos-server.yaml @@ -57,10 +57,12 @@ metadata: spec: type: ClusterIP ports: - - port: 8848 + - name: nacos-server-8848-8848 + port: 8848 protocol: TCP targetPort: 8848 - - port: 9848 + - name: nacos-server-9848-9848 + port: 9848 protocol: TCP targetPort: 9848 selector: