@@ -268,6 +268,8 @@ Application events are sent in the following order, as your application runs:
268268except for the registration of listeners and initializers.
269269. An `ApplicationEnvironmentPreparedEvent` is sent when the `Environment` to be used in
270270the context is known but before the context is created.
271+ . An `ApplicationContextInitializedEvent` is sent when the `ApplicationContext` is prepared
272+ and ApplicationContextInitializers have been called but before any bean definitions are loaded.
271273. An `ApplicationPreparedEvent` is sent just before the refresh is started but after bean
272274definitions have been loaded.
273275. An `ApplicationStartedEvent` is sent after the context has been refreshed but before any
@@ -276,6 +278,14 @@ application and command-line runners have been called.
276278been called. It indicates that the application is ready to service requests.
277279. An `ApplicationFailedEvent` is sent if there is an exception on startup.
278280
281+ The above list only includes `SpringApplicationEvent`s that are tied to a `SpringApplication`.
282+ In addition to these, the following events are also published after `ApplicationPreparedEvent`
283+ and before `ApplicationStartedEvent`:
284+
285+ . A `ContextRefreshedEvent` is sent when an `ApplicationContext` is refreshed.
286+ . A `WebServerInitializedEvent` is sent after the `WebServer` is ready. `ServletWebServerInitializedEvent`
287+ and `ReactiveWebServerInitializedEvent` are the servlet and reactive variants respectively.
288+
279289TIP: You often need not use application events, but it can be handy to know that they
280290exist. Internally, Spring Boot uses events to handle a variety of tasks.
281291
0 commit comments