Have you ever encountered a situation where you’ve to perform some tasks immediately after the Spring/SpringBoot application starts? i.e. Initialize some data into the database, initialize application-level constants, make an API call, etc.
There are several ways to achieve it. Here I’m gonna discuss: