Annotation Type EventListener


@Retention(CLASS) @Target(METHOD) public @interface EventListener

Marks a bean method that runs when start-up is over, after every CommandLineRunner and ApplicationRunner.

The method takes a ApplicationReadyEvent, or nothing. That event is the only one sent: Spring's context events (refreshed, started) all fall at that moment here, because the build wires the beans and there is no context to refresh. Listening for any other type, or for an application event of your own, is a build error; call the other bean instead.