Class ApplicationPreparedEvent
- java.lang.Object
- java.util.EventObject
- org.springframework.context.ApplicationEvent
- org.springframework.boot.context.event.SpringApplicationEvent
- org.springframework.boot.context.event.ApplicationPreparedEvent
- All Implemented Interfaces:
Serializable
public class ApplicationPreparedEvent extends SpringApplicationEvent
Event published as when aSpringApplication
is starting up and theApplicationContext
is fully prepared but not refreshed. The bean definitions will be loaded and theEnvironment
is ready for use at this stage.- See Also:
- Serialized Form
Field Summary
Fields inherited from class java.util.EventObject
source
Constructor Summary
Constructors Constructor Description ApplicationPreparedEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context)
Create a newApplicationPreparedEvent
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
ApplicationPreparedEvent
public ApplicationPreparedEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context)
Create a newApplicationPreparedEvent
instance.- Parameters:
application
- the current applicationargs
- the arguments the application is running withcontext
- the ApplicationContext about to be refreshed
Method Detail
getApplicationContext
public org.springframework.context.ConfigurableApplicationContext getApplicationContext()
Return the application context.- Returns:
- the context