1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

rename alibaba storage to alicloud storage

This commit is contained in:
flystar32
2018-09-26 10:52:47 +08:00
parent e42225fbcc
commit b0011bf328
22 changed files with 38 additions and 19 deletions

View File

@@ -50,7 +50,7 @@ public class NacosDiscoveryClient implements DiscoveryClient {
public List<ServiceInstance> getInstances(String serviceId) {
try {
NamingService namingService = nacosRegistration.getNacosNamingService();
List<Instance> instances = namingService.selectInstances(serviceId, true);
List<Instance> instances = namingService.getAllInstances(serviceId);
return hostToServiceInstanceList(instances, serviceId);
}
catch (Exception e) {
@@ -79,7 +79,9 @@ public class NacosDiscoveryClient implements DiscoveryClient {
List<Instance> instances, String serviceId) {
List<ServiceInstance> result = new ArrayList<ServiceInstance>(instances.size());
for (Instance instance : instances) {
result.add(hostToServiceInstance(instance, serviceId));
if(instance.isHealthy()) {
result.add(hostToServiceInstance(instance, serviceId));
}
}
return result;
}