You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/04/21 01:55:44 UTC

[GitHub] [servicecomb-pack] fengbaicanhe commented on a change in pull request #454: fix when server.port=0, health check fail and also fix lose consul metadata, such as 'secure=false'

fengbaicanhe commented on a change in pull request #454: fix when server.port=0, health check fail and also fix lose consul metadata, such as 'secure=false'
URL: https://github.com/apache/servicecomb-pack/pull/454#discussion_r277151319
 
 

 ##########
 File path: alpha/alpha-spring-cloud-starter-consul/src/main/java/org/apache/servicecomb/pack/alpha/server/discovery/consul/AlphaConsulAutoConfiguration.java
 ##########
 @@ -114,7 +114,11 @@ public void listenInstanceRegisteredEvent(InstanceRegisteredEvent instanceRegist
             NewService newservice =  new NewService();
             newservice.setName(service.getServiceName());
             newservice.setId(service.getServiceId());
-            List<String> tags = consulDiscoveryProperties.getTags();
+            newservice.setAddress(service.getAddress());
+            newservice.setPort(service.getServicePort());
+            newservice.setMeta(service.getServiceMeta());
 
 Review comment:
   As you know, **Spring Cloud Consul uses Consul tags to approximate metadata until Consul officially supports metadata.** 
   ```
   newservice.setMeta(service.getServiceMeta());
   ```
   this line i committed is useless, it should be remove

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services