public class ApplicationReadyEvent extends SpringApplicationEvent
SpringApplication
itself, but beware of modifying its internal state since all initialization steps will
have been completed by then.ApplicationFailedEvent,
Serialized Form| Constructor and Description |
|---|
ApplicationReadyEvent(SpringApplication application,
java.lang.String[] args,
org.springframework.context.ConfigurableApplicationContext context)
Deprecated.
since 2.6.0 for removal in 3.0.0 in favor of
ApplicationReadyEvent(SpringApplication, String[], ConfigurableApplicationContext, Duration) |
ApplicationReadyEvent(SpringApplication application,
java.lang.String[] args,
org.springframework.context.ConfigurableApplicationContext context,
java.time.Duration timeTaken)
Create a new
ApplicationReadyEvent instance. |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.context.ConfigurableApplicationContext |
getApplicationContext()
Return the application context.
|
java.time.Duration |
getTimeTaken()
Return the time taken for the application to be ready to service requests, or
null if unknown. |
getArgs, getSpringApplication@Deprecated public ApplicationReadyEvent(SpringApplication application, java.lang.String[] args, org.springframework.context.ConfigurableApplicationContext context)
ApplicationReadyEvent(SpringApplication, String[], ConfigurableApplicationContext, Duration)ApplicationReadyEvent instance.application - the current applicationargs - the arguments the application is running withcontext - the context that was being createdpublic ApplicationReadyEvent(SpringApplication application, java.lang.String[] args, org.springframework.context.ConfigurableApplicationContext context, java.time.Duration timeTaken)
ApplicationReadyEvent instance.application - the current applicationargs - the arguments the application is running withcontext - the context that was being createdtimeTaken - the time taken to get the application ready to service requestspublic org.springframework.context.ConfigurableApplicationContext getApplicationContext()
public java.time.Duration getTimeTaken()
null if unknown.