Add extra test for placeholder behaviour
This commit is contained in:
@@ -104,6 +104,14 @@ public class ConfigFileApplicationContextInitializerTests {
|
||||
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
|
||||
public void yamlProfiles() throws Exception {
|
||||
this.initializer.setNames("testprofiles");
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
spring.profiles.active=myprofile
|
||||
my.property=frompropertiesfile
|
||||
one.more=${my.property}
|
||||
|
||||
Reference in New Issue
Block a user