Update spring-cloud-zookeeper.adoc
Fixed syntax issue with discovery client example
This commit is contained in:
@@ -71,9 +71,9 @@ You can also use the `org.springframework.cloud.client.discovery.DiscoveryClient
|
||||
private DiscoveryClient discoveryClient;
|
||||
|
||||
public String serviceUrl() {
|
||||
List<ServiceInstance> list = client.getInstances("STORES");
|
||||
List<ServiceInstance> list = discoveryClient.getInstances("STORES");
|
||||
if (list != null && list.size() > 0 ) {
|
||||
return list.get(0).getUri();
|
||||
return list.get(0).getUri().toString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user