java - where to place suggested code -


i newbie spring. have spring project want run code after finishes startup. there sol'n offered here:

suggested solution

specifically, try:

 @eventlistener(applicationreadyevent.class) public void dosomethingafterstartup() { system.out.println("hello world, have started up"); } 

my question in project put code? (there bunch of code files in various directories)


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -