diff --git a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index 908e323aa5..27c9d1d858 100644 --- a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -332,7 +332,7 @@ public class SpringApplication { } return context; } - catch (Exception ex) { + catch (Throwable ex) { try { for (SpringApplicationRunListener runListener : runListeners) { finishWithException(runListener, context, ex); @@ -697,7 +697,7 @@ public class SpringApplication { } private void finishWithException(SpringApplicationRunListener runListener, - ConfigurableApplicationContext context, Exception exception) { + ConfigurableApplicationContext context, Throwable exception) { try { runListener.finished(context, exception); }