Skip to content

Commit d32216a

Browse files
committed
Add reference to Order for event listeners
1 parent 0417b89 commit d32216a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/asciidoc/core-beans.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7852,6 +7852,19 @@ This new method will publish a new `ListUpdateEvent` for every `BlackListEvent`
78527852
by the method above. If you need to publish several events, just return a `Collection` of
78537853
events instead.
78547854

7855+
Finally if you need the listener to be invoked before another one, just add the `@Order`
7856+
annotation to the method declaration:
7857+
7858+
[source,java,indent=0]
7859+
[subs="verbatim,quotes"]
7860+
----
7861+
@EventListener
7862+
@Order(42)
7863+
public void processBlackListEvent(BlackListEvent event) {
7864+
// notify appropriate parties via notificationAddress...
7865+
}
7866+
----
7867+
78557868
[[context-functionality-events-generics]]
78567869
==== Generic Events
78577870

0 commit comments

Comments
 (0)