Class ApplicationReadyEvent
- java.lang.Object
- java.util.EventObject
- org.springframework.context.ApplicationEvent
- org.springframework.boot.context.event.SpringApplicationEvent
- org.springframework.boot.context.event.ApplicationReadyEvent
- All Implemented Interfaces:
Serializable
public class ApplicationReadyEvent extends SpringApplicationEvent
Event published as late as conceivably possible to indicate that the application is ready to service requests. The source of the event is theSpringApplication
itself, but beware of modifying its internal state since all initialization steps will have been completed by then.- Since:
- 1.3.0
- See Also:
ApplicationFailedEvent
, Serialized Form
Field Summary
Fields inherited from class java.util.EventObject
source
Constructor Summary
Constructors Constructor Description ApplicationReadyEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context)
Create a newApplicationReadyEvent
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
ApplicationReadyEvent
public ApplicationReadyEvent(SpringApplication application, String[] args, org.springframework.context.ConfigurableApplicationContext context)
Create a newApplicationReadyEvent
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