I have the following ApplicationListener:
package org.mycompany.listeners; import org.springframework.context.ApplicationListener; import org.springframewor
ContextStartedEvent is published when you explicitly invoke ConfigurableApplicationContext.start() on the context. If you need an event that is published when context is initialized, use ContextRefreshedEvent.
ContextStartedEvent
ConfigurableApplicationContext.start()
ContextRefreshedEvent
See also: