Commit 17e24fd1 authored by Dave Syer's avatar Dave Syer

Add extra test for placeholder behaviour

parent efb66dcd
...@@ -104,6 +104,14 @@ public class ConfigFileApplicationContextInitializerTests { ...@@ -104,6 +104,14 @@ public class ConfigFileApplicationContextInitializerTests {
assertThat(property, equalTo("fromprofilepropertiesfile")); assertThat(property, equalTo("fromprofilepropertiesfile"));
} }
@Test
public void profilePropertiesUsedInPlaceholders() throws Exception {
this.initializer.setNames("enableprofile");
this.initializer.initialize(this.context);
String property = this.context.getEnvironment().getProperty("one.more");
assertThat(property, equalTo("fromprofilepropertiesfile"));
}
@Test @Test
public void yamlProfiles() throws Exception { public void yamlProfiles() throws Exception {
this.initializer.setNames("testprofiles"); this.initializer.setNames("testprofiles");
......
spring.profiles.active=myprofile spring.profiles.active=myprofile
my.property=frompropertiesfile my.property=frompropertiesfile
one.more=${my.property}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment