Skip to content

Commit fb17b50

Browse files
committed
Properly resolve services using datacenters map
Support was introduced in 7a21240 but dropped later, the docs still say this is supported, so this fixes this regression
1 parent 5dfa604 commit fb17b50

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

spring-cloud-consul-discovery/src/main/java/org/springframework/cloud/consul/discovery/ConsulDiscoveryClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public String description() {
5454

5555
@Override
5656
public List<ServiceInstance> getInstances(final String serviceId) {
57-
return getInstances(serviceId, new QueryParams(this.properties.getConsistencyMode()));
57+
return getInstances(serviceId,
58+
new QueryParams(this.properties.getDatacenters().get(serviceId), this.properties.getConsistencyMode()));
5859
}
5960

6061
public List<ServiceInstance> getInstances(final String serviceId, final QueryParams queryParams) {

0 commit comments

Comments
 (0)