Merge branch '3.1.x'

This commit is contained in:
Ryan Baxter
2023-05-03 14:14:31 -04:00
3 changed files with 11 additions and 1 deletions

View File

@@ -193,6 +193,15 @@ public class NativeEnvironmentRepositoryTests {
assertThat(environment.getPropertySources().get(0).getSource().get("foo")).isEqualTo("app");
}
@Test
public void placeholdersApplicationWithPrefixAndProfile() {
this.repository.setSearchLocations("classpath:/test/{profile}/{application}/");
// gh-2259 application name starts with "application"
Environment environment = this.repository.findOne("applicationxyz", "dev", "master");
assertThat(environment.getPropertySources().size()).isEqualTo(1);
assertThat(environment.getPropertySources().get(0).getSource().get("foo")).isEqualTo("default-app");
}
@Test
public void locationPlaceholdersApplication() {
this.repository.setSearchLocations("classpath:/test/{application}");