Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robberphex committed Feb 17, 2023
1 parent 5ed29f7 commit 967ae90
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class HelloServiceCImpl implements HelloServiceC {
private String topic;

@Autowired
String servcieTag;
String serviceTag;

@Value("${throwException:false}")
boolean throwException;
Expand All @@ -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)) {
Expand All @@ -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;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 967ae90

Please sign in to comment.