Polish restoration of ConfigFileApplicationListener
See gh-27303
This commit is contained in:
parent
b39ed7f086
commit
8540bc0d12
|
@ -129,6 +129,7 @@ public class ConfigDataEnvironmentPostProcessor implements EnvironmentPostProces
|
||||||
getLegacyListener().addPropertySources(environment, resourceLoader);
|
getLegacyListener().addPropertySources(environment, resourceLoader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
LegacyConfigFileApplicationListener getLegacyListener() {
|
LegacyConfigFileApplicationListener getLegacyListener() {
|
||||||
return new LegacyConfigFileApplicationListener(this.logFactory.getLog(ConfigFileApplicationListener.class));
|
return new LegacyConfigFileApplicationListener(this.logFactory.getLog(ConfigFileApplicationListener.class));
|
||||||
}
|
}
|
||||||
|
@ -200,6 +201,7 @@ public class ConfigDataEnvironmentPostProcessor implements EnvironmentPostProces
|
||||||
postProcessor.postProcessEnvironment(environment, resourceLoader, additionalProfiles);
|
postProcessor.postProcessEnvironment(environment, resourceLoader, additionalProfiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
static class LegacyConfigFileApplicationListener extends ConfigFileApplicationListener {
|
static class LegacyConfigFileApplicationListener extends ConfigFileApplicationListener {
|
||||||
|
|
||||||
LegacyConfigFileApplicationListener(Log logger) {
|
LegacyConfigFileApplicationListener(Log logger) {
|
||||||
|
|
|
@ -71,6 +71,7 @@ class ConfigDataEnvironmentPostProcessorTests {
|
||||||
private ArgumentCaptor<ResourceLoader> resourceLoaderCaptor;
|
private ArgumentCaptor<ResourceLoader> resourceLoaderCaptor;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Deprecated
|
||||||
void defaultOrderMatchesDeprecatedListener() {
|
void defaultOrderMatchesDeprecatedListener() {
|
||||||
assertThat(ConfigDataEnvironmentPostProcessor.ORDER).isEqualTo(ConfigFileApplicationListener.DEFAULT_ORDER);
|
assertThat(ConfigDataEnvironmentPostProcessor.ORDER).isEqualTo(ConfigFileApplicationListener.DEFAULT_ORDER);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,6 +72,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||||
* @author Scott Frederick
|
* @author Scott Frederick
|
||||||
* @author Nguyen Bao Sach
|
* @author Nguyen Bao Sach
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@ExtendWith({ OutputCaptureExtension.class, UseLegacyProcessing.class })
|
@ExtendWith({ OutputCaptureExtension.class, UseLegacyProcessing.class })
|
||||||
class ConfigFileApplicationListenerTests {
|
class ConfigFileApplicationListenerTests {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue