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
Event published once the application context has been refreshed but before any
application and command line
runners have been called.- Since:
- 2.0.0
- Author:
- Andy Wilkinson
- See Also:
- 
Field SummaryFields inherited from class EventObjectsource
- 
Constructor SummaryConstructorsConstructorDescriptionApplicationStartedEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, @Nullable Duration timeTaken) Create a newApplicationStartedEventinstance.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the application context.@Nullable DurationReturn the time taken to start the application, ornullif unknown.Methods inherited from class SpringApplicationEventgetArgs, getSpringApplicationMethods inherited from class ApplicationEventgetTimestampMethods inherited from class EventObjectgetSource, toString
- 
Constructor Details- 
ApplicationStartedEventpublic ApplicationStartedEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, @Nullable Duration timeTaken) Create a newApplicationStartedEventinstance.- Parameters:
- application- the current application
- args- the arguments the application is running with
- context- the context that was being created
- timeTaken- the time taken to start the application
- Since:
- 2.6.0
 
 
- 
- 
Method Details- 
getApplicationContextReturn the application context.- Returns:
- the context
 
- 
getTimeTakenReturn the time taken to start the application, ornullif unknown.- Returns:
- the startup time
- Since:
- 2.6.0
 
 
-