Skip to content

Commit

Permalink
GH-346 - Allow explicit declaration of identifier in @ApplicationModu…
Browse files Browse the repository at this point in the history
…leListener.
  • Loading branch information
odrotbohm committed Nov 1, 2023
1 parent 7974285 commit e57a910
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.AliasFor;
import org.springframework.scheduling.annotation.Async;
import org.springframework.transaction.annotation.Propagation;
Expand Down Expand Up @@ -54,4 +55,15 @@
*/
@AliasFor(annotation = Transactional.class, attribute = "readOnly")
boolean readOnlyTransaction() default false;

/**
* An optional identifier for the listener, defaulting to the fully-qualified signature of the declaring method (e.g.
* "mypackage.MyClass.myMethod()").
*
* @since 1.1
* @see EventListener#id
* @see TransactionalApplicationListener#getListenerId()
*/
@AliasFor(annotation = EventListener.class, attribute = "id")
String id() default "";
}

0 comments on commit e57a910

Please sign in to comment.