From 5e0e9416325cbe6251db76d2bcc2249c94eaf9b5 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 17 Sep 2018 10:50:28 +0100 Subject: [PATCH] Polish "Publish ApplicationContextInitializedEvent on contextPrepared" Closes gh-14478 --- .../context/event/ApplicationContextInitializedEvent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationContextInitializedEvent.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationContextInitializedEvent.java index 82bdcfbe22..dd88bbfb05 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationContextInitializedEvent.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationContextInitializedEvent.java @@ -36,7 +36,7 @@ public class ApplicationContextInitializedEvent extends SpringApplicationEvent { * Create a new {@link ApplicationContextInitializedEvent} instance. * @param application the current application * @param args the arguments the application is running with - * @param context the context that was being created (maybe null) + * @param context the context that has been initialized */ public ApplicationContextInitializedEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context) { @@ -48,7 +48,7 @@ public class ApplicationContextInitializedEvent extends SpringApplicationEvent { * Return the application context. * @return the context */ - public ConfigurableApplicationContext getContext() { + public ConfigurableApplicationContext getApplicationContext() { return this.context; }