Class ApplicationStartingEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
org.springframework.boot.context.event.SpringApplicationEvent
org.springframework.boot.context.event.ApplicationStartingEvent
- All Implemented Interfaces:
Serializable
Event published as early as conceivably possible as soon as a
SpringApplication
has been started - before the Environment
or ApplicationContext
is
available, but after the ApplicationListener
s have been registered. The source
of the event is the SpringApplication
itself, but beware of using its internal
state too much at this early stage since it might be modified later in the lifecycle.- Since:
- 1.5.0
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionApplicationStartingEvent
(ConfigurableBootstrapContext bootstrapContext, SpringApplication application, String[] args) Create a newApplicationStartingEvent
instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the bootstrap context.Methods inherited from class org.springframework.boot.context.event.SpringApplicationEvent
getArgs, getSpringApplication
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
ApplicationStartingEvent
public ApplicationStartingEvent(ConfigurableBootstrapContext bootstrapContext, SpringApplication application, String[] args) Create a newApplicationStartingEvent
instance.- Parameters:
bootstrapContext
- the bootstrap contextapplication
- the current applicationargs
- the arguments the application is running with
-
-
Method Details
-
getBootstrapContext
Return the bootstrap context.- Returns:
- the bootstrap context
- Since:
- 2.4.0
-