Make PID and application version available in the environment
Adds the following new properties: - spring.application.pid - spring.application.version Refactors the ResourceBanner and the structured logging support to use the new properties. Closes gh-41604
This commit is contained in:
@@ -160,11 +160,11 @@ class SpringBootContextLoaderTests {
|
||||
.stream()
|
||||
.map(PropertySource::getName)
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
String last = names.remove(names.size() - 1);
|
||||
String configResource = names.remove(names.size() - 2);
|
||||
assertThat(names).containsExactly("configurationProperties", "Inlined Test Properties", "commandLineArgs",
|
||||
"servletConfigInitParams", "servletContextInitParams", "systemProperties", "systemEnvironment",
|
||||
"random");
|
||||
assertThat(last).startsWith("Config resource");
|
||||
"random", "applicationInfo");
|
||||
assertThat(configResource).startsWith("Config resource");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user