Announcement Announcement Module
Collapse
No announcement yet.
ContextStartedEvent Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ContextStartedEvent

    Hi all,

    I need to do some task at application context startup and then I've implemented my custom listener as the following:
    Code:
    public class StartupTasks implements ApplicationListener {
    
    	@Override
    	public void onApplicationEvent(ApplicationEvent event) {
    		if(event instanceof ContextStartedEvent) {
                           doSomething();
    		}			
    	}
    }
    However the ContextStartedEvent event is never triggered. I can observe only ContextRefreshedEvent at startup, but it's called more than once.

    Any help appreciated...thanks.
Working...
X