The Spring Cloud Config server can now support multiple labels (#2449). The config client no longer needs to worry about handling that on the client side.
|
String[] labels = new String[] { "" }; |
|
if (StringUtils.hasText(properties.getLabel())) { |
|
labels = StringUtils.commaDelimitedListToStringArray(properties.getLabel()); |
|
} |
|
String state = ConfigClientStateHolder.getState(); |
|
// Try all the labels until one works |
|
for (String label : labels) { |
|
Environment result = getRemoteEnvironment(context, resource, label.trim(), state); |
|
if (result != null) { |
|
log(result); |
The Spring Cloud Config server can now support multiple labels (#2449). The config client no longer needs to worry about handling that on the client side.
spring-cloud-config/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServerConfigDataLoader.java
Lines 116 to 125 in 974b7c3