public class ApplicationStartedEvent extends SpringApplicationEvent
application
and command line
runners have been called.Constructor and Description |
---|
ApplicationStartedEvent(SpringApplication application,
java.lang.String[] args,
org.springframework.context.ConfigurableApplicationContext context)
Deprecated.
since 2.6.0 for removal in 2.8.0 in favor of
ApplicationStartedEvent(SpringApplication, String[], ConfigurableApplicationContext, Duration) |
ApplicationStartedEvent(SpringApplication application,
java.lang.String[] args,
org.springframework.context.ConfigurableApplicationContext context,
java.time.Duration timeTaken)
Create a new
ApplicationStartedEvent instance. |
Modifier and Type | Method and Description |
---|---|
org.springframework.context.ConfigurableApplicationContext |
getApplicationContext()
Return the application context.
|
java.time.Duration |
getTimeTaken()
Return the time taken to start the application, or
null if unknown. |
getArgs, getSpringApplication
@Deprecated public ApplicationStartedEvent(SpringApplication application, java.lang.String[] args, org.springframework.context.ConfigurableApplicationContext context)
ApplicationStartedEvent(SpringApplication, String[], ConfigurableApplicationContext, Duration)
ApplicationStartedEvent
instance.application
- the current applicationargs
- the arguments the application is running withcontext
- the context that was being createdpublic ApplicationStartedEvent(SpringApplication application, java.lang.String[] args, org.springframework.context.ConfigurableApplicationContext context, java.time.Duration timeTaken)
ApplicationStartedEvent
instance.application
- the current applicationargs
- the arguments the application is running withcontext
- the context that was being createdtimeTaken
- the time taken to start the applicationpublic org.springframework.context.ConfigurableApplicationContext getApplicationContext()
public java.time.Duration getTimeTaken()
null
if unknown.