Spring Application Context Events
1. Introduction
In this tutorial, we'll learn about the event support mechanism provided by the Spring framework. We'll explore the various built-in events provided by the framework and then see how to consume an event.
To learn about creating and publishing custom events, have a look at our previous tutorial here.
Spring has an eventing mechanism which is built around the ApplicationContext. It can be used to exchange information between different beans. We can make use of application events by listening for events and executing custom code.
For example, a scenario here would be to execute custom logic on the complete startup of the ApplicationContext.