ApplicationContextInitializedEvent class
Published once the context is created and the ApplicationContextInitializers have run, before any bean is created.
Only a listener registered on the SpringApplication receives it. Here ApplicationPreparedEvent follows right after it, because the bean definitions are known from the start; in Spring Boot the sources are loaded in between.
Spring (Java): ApplicationContextInitializedEvent.
- Inheritance
-
- Object
- ApplicationEvent
- SpringApplicationEvent
- ApplicationContextInitializedEvent
Constructors
-
ApplicationContextInitializedEvent(SpringApplication application, List<
String> args, ConfigurableApplicationContext applicationContext) -
The event for
applicationrun withargs, carryingapplicationContext; published bySpringApplication.
Properties
- applicationContext → ConfigurableApplicationContext
-
The new context. Its bean definitions can still be changed; no bean
is created yet.
final
-
args
→ List<
String> -
The arguments of the run, as
mainreceived them.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → Object
-
The object that raised the event, usually the publishing bean (or
the context, for the context's own events).
finalinherited
- springApplication → SpringApplication
-
The application being started; the same object as
source, with its type.no setterinherited - timestamp → DateTime
-
When the event was created (not when a listener receives it).
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited