You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring boot offers multiple options, for executing your code during the application startup. This post covers some of the ‘out of the box’ practices recommended by the Spring developers. There are mainly 3 options
4
+
5
+
- Option-1: Using @PostConstruct annotation
6
+
- Option-2: Using ApplicationRunner or Command Line Runner Interface
7
+
- Option-3: Using Spring Boot Events
8
+
9
+
In this article, we will cover all of the available options and look into the best practices dos and don'ts.
10
+
11
+
12
+
Read [full article on stacktips.com](https://stacktips.com/articles/how-to-execute-code-on-spring-boot-application-startup)
0 commit comments