Commit 048ca4e
GH-1269: @RabbitListener: Allow other Annotations
Resolves #1269
Previously, a parameter annotated with a "foreign" annoation (e.g. `@Validated`)
would not be considered as an eligible payload conversion target; it must also
have been annotated with `@Payload`.
- remove the check for zero annotations
- add a check that the method is not annotated with both `@Payload` and `@Header`
- ignore if it does, with a warn log, to be consistent with previous behavior.
- in a future release we might consider this to be fatal.
**cherry-pick to 2.2.x**1 parent 1d669cd commit 048ca4e
File tree
2 files changed
+31
-6
lines changed- spring-rabbit/src
- main/java/org/springframework/amqp/rabbit/listener/adapter
- test/java/org/springframework/amqp/rabbit/annotation
2 files changed
+31
-6
lines changedLines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
336 | | - | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
339 | 349 | | |
340 | | - | |
341 | | - | |
| 350 | + | |
| 351 | + | |
342 | 352 | | |
343 | 353 | | |
344 | 354 | | |
| |||
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
1137 | 1138 | | |
1138 | 1139 | | |
1139 | 1140 | | |
1140 | | - | |
1141 | | - | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1142 | 1144 | | |
1143 | 1145 | | |
1144 | 1146 | | |
| |||
1581 | 1583 | | |
1582 | 1584 | | |
1583 | 1585 | | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
1584 | 1599 | | |
1585 | 1600 | | |
1586 | 1601 | | |
| |||
2178 | 2193 | | |
2179 | 2194 | | |
2180 | 2195 | | |
2181 | | - | |
| 2196 | + | |
2182 | 2197 | | |
2183 | 2198 | | |
2184 | 2199 | | |
| |||
0 commit comments