Class ApplicationContextInitializedEvent
- java.lang.Object
- java.util.EventObject
- org.springframework.context.ApplicationEvent
- org.springframework.boot.context.event.SpringApplicationEvent
- org.springframework.boot.context.event.ApplicationContextInitializedEvent
- All Implemented Interfaces:
Serializable
public class ApplicationContextInitializedEvent extends SpringApplicationEvent
Event published when aSpringApplication
is starting up and theApplicationContext
is prepared and ApplicationContextInitializers have been called but before any bean definitions are loaded.- Since:
- 2.1.0
- See Also:
- Serialized Form
Field Summary
Fields inherited from class java.util.EventObject
source
Constructor Summary
Constructors Constructor Description ApplicationContextInitializedEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context)
Create a newApplicationContextInitializedEvent
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.context.ConfigurableApplicationContext
getApplicationContext()
Return the application context.Methods inherited from class org.springframework.boot.context.event.SpringApplicationEvent
getArgs, getSpringApplication
Methods inherited from class java.util.EventObject
getSource, toString
Constructor Detail
ApplicationContextInitializedEvent
public ApplicationContextInitializedEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context)
Create a newApplicationContextInitializedEvent
instance.- Parameters:
application
- the current applicationargs
- the arguments the application is running withcontext
- the context that has been initialized
Method Detail
getApplicationContext
public org.springframework.context.ConfigurableApplicationContext getApplicationContext()
Return the application context.- Returns:
- the context