diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteSpringApplication.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteSpringApplication.java index 4af5df413d..06cd43a194 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteSpringApplication.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/RemoteSpringApplication.java @@ -26,7 +26,6 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.WebApplicationType; import org.springframework.boot.context.config.AnsiOutputApplicationListener; import org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor; -import org.springframework.boot.context.logging.ClasspathLoggingApplicationListener; import org.springframework.boot.context.logging.LoggingApplicationListener; import org.springframework.boot.devtools.remote.client.RemoteClientConfiguration; import org.springframework.boot.devtools.restart.RestartInitializer; @@ -75,7 +74,6 @@ public final class RemoteSpringApplication { listeners.add(new AnsiOutputApplicationListener()); listeners.add(new EnvironmentPostProcessorApplicationListener( EnvironmentPostProcessorsFactory.of(ConfigDataEnvironmentPostProcessor.class))); - listeners.add(new ClasspathLoggingApplicationListener()); listeners.add(new LoggingApplicationListener()); listeners.add(new RemoteUrlPropertyExtractor()); return listeners; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/ClasspathLoggingApplicationListener.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/ClasspathLoggingApplicationListener.java index eac5ecf5bf..79d094937a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/ClasspathLoggingApplicationListener.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/ClasspathLoggingApplicationListener.java @@ -24,6 +24,7 @@ import org.apache.commons.logging.LogFactory; import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.context.event.ApplicationFailedEvent; +import org.springframework.boot.diagnostics.FailureAnalysis; import org.springframework.context.ApplicationEvent; import org.springframework.context.event.GenericApplicationListener; import org.springframework.context.event.SmartApplicationListener; @@ -37,7 +38,10 @@ import org.springframework.core.ResolvableType; * * @author Andy Wilkinson * @since 2.0.0 + * @deprecated since 2.4.0 with no direct replacement. {@link FailureAnalysis} is now the + * preferred approach for diagnosing and reporting startup failures. */ +@Deprecated public final class ClasspathLoggingApplicationListener implements GenericApplicationListener { private static final int ORDER = LoggingApplicationListener.DEFAULT_ORDER + 1; diff --git a/spring-boot-project/spring-boot/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot/src/main/resources/META-INF/spring.factories index 543f83941d..1c5ad2f537 100644 --- a/spring-boot-project/spring-boot/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot/src/main/resources/META-INF/spring.factories @@ -42,7 +42,6 @@ org.springframework.boot.builder.ParentContextCloserApplicationListener,\ org.springframework.boot.context.FileEncodingApplicationListener,\ org.springframework.boot.context.config.AnsiOutputApplicationListener,\ org.springframework.boot.context.config.DelegatingApplicationListener,\ -org.springframework.boot.context.logging.ClasspathLoggingApplicationListener,\ org.springframework.boot.context.logging.LoggingApplicationListener,\ org.springframework.boot.env.EnvironmentPostProcessorApplicationListener,\ org.springframework.boot.liquibase.LiquibaseServiceLocatorApplicationListener