Merge branch '466' of https://github.com/srempfer/spring-cloud-commons into srempfer-466
This commit is contained in:
@@ -154,6 +154,8 @@ public class BootstrapApplicationListener
|
||||
}
|
||||
String configLocation = environment
|
||||
.resolvePlaceholders("${spring.cloud.bootstrap.location:}");
|
||||
String configAdditionalLocation = environment
|
||||
.resolvePlaceholders("${spring.cloud.bootstrap.additional-location:}");
|
||||
Map<String, Object> bootstrapMap = new HashMap<>();
|
||||
bootstrapMap.put("spring.config.name", configName);
|
||||
// if an app (or test) uses spring.main.web-application-type=reactive, bootstrap
|
||||
@@ -165,6 +167,10 @@ public class BootstrapApplicationListener
|
||||
if (StringUtils.hasText(configLocation)) {
|
||||
bootstrapMap.put("spring.config.location", configLocation);
|
||||
}
|
||||
if (StringUtils.hasText(configAdditionalLocation)) {
|
||||
bootstrapMap.put("spring.config.additional-location",
|
||||
configAdditionalLocation);
|
||||
}
|
||||
bootstrapProperties.addFirst(
|
||||
new MapPropertySource(BOOTSTRAP_PROPERTY_SOURCE_NAME, bootstrapMap));
|
||||
for (PropertySource<?> source : environment.getPropertySources()) {
|
||||
|
||||
Reference in New Issue
Block a user