wujimin commented on a change in pull request #1658: [SCB-1816] print the 
instance endpoints in the end of the start up log
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1658#discussion_r396494731
 
 

 ##########
 File path: 
core/src/main/java/org/apache/servicecomb/core/bootup/ServiceInformationCollector.java
 ##########
 @@ -29,7 +31,16 @@ public String collect() {
         + "\n" + "Version: " + RegistryUtils.getMicroservice().getVersion()
         + "\n" + "Environment: " + 
RegistryUtils.getMicroservice().getEnvironment()
         + "\n" + "Service ID: " + 
RegistryUtils.getMicroserviceInstance().getServiceId()
-        + "\n" + "Instance ID: " + 
RegistryUtils.getMicroserviceInstance().getInstanceId();
+        + "\n" + "Instance ID: " + 
RegistryUtils.getMicroserviceInstance().getInstanceId()
+        + "\n" + "Endpoints: " + getEndpoints();
+  }
+
+  private String getEndpoints() {
+    try {
+      return 
JsonUtils.writeValueAsString(RegistryUtils.getMicroserviceInstance().getEndpoints());
 
 Review comment:
   换成io.vertx.core.spi.json.JsonCodec#toString(java.lang.Object),就不用自己写了

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to