Annotation Interface EventListener


@Documented @Retention(RUNTIME) @Target({ANNOTATION_TYPE,METHOD}) @Adapter(io.micronaut.context.event.ApplicationEventListener.class) @Indexed(io.micronaut.context.event.ApplicationEventListener.class) @Inherited public @interface EventListener

An Adapter advice annotation that allows listening for events by implementing the ApplicationEventListener interface.

For example:


  @EventListener
   public void onStartup(StartupEvent startupEvent) {
   }
 
Since:
1.0