Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

How to Execute Code on Spring Boot Application Startup?

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

  • Option-1: Using @PostConstruct annotation
  • Option-2: Using ApplicationRunner or Command Line Runner Interface
  • Option-3: Using Spring Boot Events

In this article, we will cover all of the available options and look into the best practices dos and don'ts.

Read full article on stacktips.com

Related topics: