Skip stub property sources during bootstrap

The stub property sources from a web application context do not
contain any properties so they cab't have any effect on
bootstrap. It's cleaner to leave them out of the bootstrap
application context.
This commit is contained in:
Dave Syer
2017-10-19 17:16:48 +01:00
parent 74d9cd3060
commit 92cabcdf1a
2 changed files with 7 additions and 2 deletions

View File

@@ -41,7 +41,8 @@ public class ContextRefresherTests {
.contains("applicationConfig: [classpath:/bootstrap-refresh.properties]");
assertThat(names).containsSequence(
"applicationConfig: [classpath:/application.properties]",
"applicationConfig: [classpath:/bootstrap-refresh.properties]");
"applicationConfig: [classpath:/bootstrap-refresh.properties]",
"applicationConfig: [classpath:/bootstrap.properties]");
}
}
@@ -77,7 +78,7 @@ public class ContextRefresherTests {
protected static class PropertySourceConfiguration implements PropertySourceLocator {
public static Map<String, Object> MAP = new HashMap<>(
Collections.<String, Object>singletonMap("bootstrap.context-refresh.foo", "refresh"));
Collections.<String, Object>singletonMap("bootstrap.foo", "refresh"));
@Override
public PropertySource<?> locate(Environment environment) {