Spring boot loader
1 answer
You can execute some code after the spring boot process is complete, when the startup process is complete, you can send a boot completion notification.
@SpringBootApplication
@Component
public class Application implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
public void run(String... arg0) throws Exception {
// You can write your code here.
// This code will be executed after Spring Boot Startup completed.
}
}
Just execute CommandLineRunner as shown above.
+3
source to share