Interface CommandLineRunner
public interface CommandLineRunner
A bean that runs once the server is accepting, with the program's command-line arguments, as Spring Boot's does.
Every such bean runs in the order of its @Order, together with the
ApplicationRunner beans, before ApplicationReadyEvent is sent. One that
throws stops the server, so a start-up task that fails fails the start.
@Component
public class Seed implements CommandLineRunner {
public void run(String... args) {
// ...
}
}
-
Method Summary
-
Method Details
-
run
-