diff --git a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/annotation/AbstractRabbitAnnotationDrivenTests.java b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/annotation/AbstractRabbitAnnotationDrivenTests.java index 929e419c..bea83644 100644 --- a/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/annotation/AbstractRabbitAnnotationDrivenTests.java +++ b/spring-rabbit/src/test/java/org/springframework/amqp/rabbit/annotation/AbstractRabbitAnnotationDrivenTests.java @@ -323,20 +323,16 @@ public abstract class AbstractRabbitAnnotationDrivenTests { @Component static class RabbitListenersBean { - @RabbitListeners({ - @RabbitListener(id = "first", queues = "myQueue"), - @RabbitListener(id = "second", queues = "anotherQueue") - }) + @RabbitListener(id = "first", queues = "myQueue") + @RabbitListener(id = "second", queues = "anotherQueue") public void repeatableHandle(String msg) { } } @Component - @RabbitListeners({ - @RabbitListener(id = "third", queues = "class1"), - @RabbitListener(id = "fourth", queues = "class2") - }) + @RabbitListener(id = "third", queues = "class1") + @RabbitListener(id = "fourth", queues = "class2") static class ClassLevelListenersBean { @RabbitHandler diff --git a/src/reference/asciidoc/amqp.adoc b/src/reference/asciidoc/amqp.adoc index 9c10997b..81c12381 100644 --- a/src/reference/asciidoc/amqp.adoc +++ b/src/reference/asciidoc/amqp.adoc @@ -2851,7 +2851,6 @@ This means that the annotation can appear on the same annotated element (method In this case, a separate listener container is created for each annotation, each of which invokes the same listener `@Bean`. Repeatable annotations can be used with Java 8 or above. -When using Java 7 or earlier, you can achieve the same effect by using the `@RabbitListeners` "`container`" annotation, with an array of `@RabbitListener` annotations. ====== Proxy `@RabbitListener` and Generics