diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/EnableWebSocketMessageBroker.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/EnableWebSocketMessageBroker.java index 7cf413c8e2..5251c4cf98 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/EnableWebSocketMessageBroker.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/EnableWebSocketMessageBroker.java @@ -49,7 +49,7 @@ import org.springframework.context.annotation.Import; * @Bean * public void configureMessageBroker(MessageBrokerConfigurer configurer) { * configurer.enableStompBrokerRelay("/queue/", "/topic/"); - * configurer.setAnnotationMethodDestinationPrefixes("/app/"); + * configurer.setApplicationDestinationPrefixes("/app/"); * } * } * diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerConfigurer.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerConfigurer.java index 96f4ba183e..7a2a23301a 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerConfigurer.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerConfigurer.java @@ -37,7 +37,7 @@ public class MessageBrokerConfigurer { private StompBrokerRelayRegistration stompRelay; - private String[] annotationMethodDestinationPrefixes; + private String[] applicationDestinationPrefixes; private String userDestinationPrefix; @@ -67,10 +67,10 @@ public class MessageBrokerConfigurer { } /** - * Configure one or more prefixes to filter destinations targeting annotated - * application methods. For example destinations prefixed with "/app" may be processed - * by annotated application methods while other destinations may target the message - * broker (e.g. "/topic", "/queue"). + * Configure one or more prefixes to filter destinations targeting application + * annotated methods. For example destinations prefixed with "/app" may be + * processed by annotated methods while other destinations may target the + * message broker (e.g. "/topic", "/queue"). *
* When messages are processed, the matching prefix is removed from the destination in * order to form the lookup path. This means annotations should not contain the @@ -78,8 +78,8 @@ public class MessageBrokerConfigurer { *
* Prefixes that do not have a trailing slash will have one automatically appended.
*/
- public MessageBrokerConfigurer setAnnotationMethodDestinationPrefixes(String... destinationPrefixes) {
- this.annotationMethodDestinationPrefixes = destinationPrefixes;
+ public MessageBrokerConfigurer setApplicationDestinationPrefixes(String... prefixes) {
+ this.applicationDestinationPrefixes = prefixes;
return this;
}
@@ -118,9 +118,9 @@ public class MessageBrokerConfigurer {
return (this.stompRelay != null) ? this.stompRelay.getMessageHandler() : null;
}
- protected Collection