Merge branch 'master' into 2.0.x
This commit is contained in:
@@ -360,6 +360,15 @@ public class BootstrapConfigurationTests {
|
||||
assertTrue(this.context.getEnvironment().acceptsProfiles("bar"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void includeProfileFromBootstrapProperties() {
|
||||
this.context = new SpringApplicationBuilder().web(false)
|
||||
.sources(BareConfiguration.class)
|
||||
.properties("spring.cloud.bootstrap.name=local").run();
|
||||
assertTrue(this.context.getEnvironment().acceptsProfiles("local"));
|
||||
assertEquals("Hello added!", this.context.getEnvironment().getProperty("added"));
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableConfigurationProperties
|
||||
protected static class BareConfiguration {
|
||||
|
||||
Reference in New Issue
Block a user