Commit 39c9c44
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 fed2f31 commit 39c9c44
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 | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
1148 | 1149 | | |
1149 | 1150 | | |
1150 | 1151 | | |
1151 | | - | |
1152 | | - | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
1153 | 1155 | | |
1154 | 1156 | | |
1155 | 1157 | | |
| |||
1592 | 1594 | | |
1593 | 1595 | | |
1594 | 1596 | | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
1595 | 1610 | | |
1596 | 1611 | | |
1597 | 1612 | | |
| |||
2189 | 2204 | | |
2190 | 2205 | | |
2191 | 2206 | | |
2192 | | - | |
| 2207 | + | |
2193 | 2208 | | |
2194 | 2209 | | |
2195 | 2210 | | |
| |||
0 commit comments