Browse Source

Improve deprecated exception message

Update the exception message so that it includes the class name of the
implementation.

See gh-22497
pull/22604/head
Phillip Webb 5 years ago
parent
commit
84bcd0eb1e
  1. 4
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java

4
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java

@ -192,8 +192,8 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor, @@ -192,8 +192,8 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
@Override
public void onApplicationEvent(ApplicationEvent event) {
throw new IllegalStateException(
"ConfigFileApplicationListener is deprecated and can only be used as an EnvironmentPostProcessor");
throw new IllegalStateException("ConfigFileApplicationListener [" + getClass().getName()
+ "] is deprecated and can only be used as an EnvironmentPostProcessor");
}
@Override

Loading…
Cancel
Save