Last active
September 19, 2018 23:43
-
-
Save carlosspohr/b61dad2cbf23da1c2aa14b46043864c3 to your computer and use it in GitHub Desktop.
Exemplo de como executar uma lógica qualquer logo depois da inicialização do VRaptor 4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.inf.carlos.vraptor; | |
import javax.enterprise.context.ApplicationScoped; | |
import javax.enterprise.event.Observes; | |
import org.apache.log4j.Logger; | |
import br.com.caelum.vraptor.events.VRaptorInitialized; | |
@ApplicationScoped | |
public class InitializationHandler { | |
private static final Logger logger = Logger.getLogger(InitializationHandler.class); | |
public void observesContext(@Observes VRaptorInitialized ini) throws SQLException { | |
System.out.println("Faz alguma coisa muito legal aqui...."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment