Class ApplicationStartedEvent
- java.lang.Object
- java.util.EventObject
- org.springframework.context.ApplicationEvent
- org.springframework.boot.context.event.SpringApplicationEvent
- org.springframework.boot.context.event.ApplicationStartedEvent
- All Implemented Interfaces:
Serializable
public class ApplicationStartedEvent extends SpringApplicationEvent
Event published once the application context has been refreshed but before anyapplication
andcommand line
runners have been called.- Since:
- 2.0.0
- See Also:
- Serialized Form
Field Summary
Fields inherited from class java.util.EventObject
source
Constructor Summary
Constructors Constructor Description ApplicationStartedEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context)
Create a newApplicationStartedEvent
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
ApplicationStartedEvent
public ApplicationStartedEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context)
Create a newApplicationStartedEvent
instance.- Parameters:
application
- the current applicationargs
- the arguments the application is running withcontext
- the context that was being created
Method Detail
getApplicationContext
public org.springframework.context.ConfigurableApplicationContext getApplicationContext()
Return the application context.- Returns:
- the context