leandromoraesrj / sincad-backend

PROJETO BASE DE EXEMPLO USANDO AS MELHORES PRATICAS DE DESENVOLVIMENTO
0 stars 0 forks source link

Implementação do CommandLineRunner #33

Open leandromoraesrj opened 2 years ago

leandromoraesrj commented 2 years ago

Para iniciar um método logo após o "void main"

leandromoraesrj commented 2 years ago

Basta adicionar à classe main implements CommandLineRunner e implementar o método:

public void run(String... args) throws Exception {
}

Toda a implementação no run será executa após instanciação de toda a aplicação, inclusive, a conexão ao banco;