Skip to content

Commit

Permalink
fix(registry-nacos):fix nacos service name associated with group name (
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ authored Jun 1, 2020
1 parent 0791c7c commit 6a45acb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.naming.NamingService;
import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.api.naming.utils.NamingUtils;

import java.util.Properties;

Expand Down Expand Up @@ -90,7 +91,7 @@ public static Instance toInstance(ServiceInstance serviceInstance) {
*/
public static ServiceInstance toServiceInstance(Instance instance) {
DefaultServiceInstance serviceInstance = new DefaultServiceInstance(instance.getInstanceId(),
instance.getServiceName(), instance.getIp(), instance.getPort());
NamingUtils.getServiceName(instance.getServiceName()), instance.getIp(), instance.getPort());
serviceInstance.setMetadata(instance.getMetadata());
serviceInstance.setEnabled(instance.isEnabled());
serviceInstance.setHealthy(instance.isHealthy());
Expand Down

0 comments on commit 6a45acb

Please sign in to comment.