1. import io.micronaut.aop.Adapter;
    2. import io.micronaut.context.event.ApplicationEventListener;
    3. import io.micronaut.core.annotation.Indexed;
    4. import static java.lang.annotation.RetentionPolicy.RUNTIME;
    5. @Documented
    6. @Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
    7. @Adapter(ApplicationEventListener.class) (1)
    8. @Indexed(ApplicationEventListener.class)
    9. public @interface EventListener {
    Micronaut will also automatically align the generic types for the SAM interface if they are specified.