|
30 | 30 | *
|
31 | 31 | * <p>If the event is not published within the boundaries of a managed transaction, the event
|
32 | 32 | * is discarded unless the {@link #fallbackExecution} flag is explicitly set. If a
|
33 |
| - * transaction is running, the event is processed according to its {@link TransactionPhase}. |
| 33 | + * transaction is running, the event is processed according to its {@code TransactionPhase}. |
34 | 34 | *
|
35 | 35 | * <p>Adding {@link org.springframework.core.annotation.Order @Order} on your annotated method
|
36 | 36 | * allows you to prioritize that listener amongst other listeners running in the same phase.
|
37 | 37 | *
|
38 | 38 | * @author Stephane Nicoll
|
| 39 | + * @author Sam Brannen |
39 | 40 | * @since 4.2
|
40 | 41 | */
|
41 | 42 | @EventListener
|
|
59 | 60 | /**
|
60 | 61 | * Alias for {@link #classes}.
|
61 | 62 | */
|
62 |
| - @AliasFor("classes") |
| 63 | + @AliasFor(annotation = EventListener.class, attribute = "classes") |
63 | 64 | Class<?>[] value() default {};
|
64 | 65 |
|
65 | 66 | /**
|
66 | 67 | * The event classes that this listener handles.
|
67 |
| - * <p>When this attribute is specified with one value, the method parameter |
68 |
| - * may or may not be specified. When this attribute is specified with more |
69 |
| - * than one value, the method must not have a parameter. |
| 68 | + * <p>If this attribute is specified with a single value, the annotated |
| 69 | + * method may optionally accept a single parameter. However, if this |
| 70 | + * attribute is specified with multiple values, the annotated method |
| 71 | + * must <em>not</em> declare any parameters. |
70 | 72 | */
|
71 |
| - @AliasFor("value") |
| 73 | + @AliasFor(annotation = EventListener.class, attribute = "classes") |
72 | 74 | Class<?>[] classes() default {};
|
73 | 75 |
|
74 | 76 | /**
|
|
0 commit comments