Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
5915b23e
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5915b23e
编写于
11月 10, 2013
作者:
R
Rossen Stoyanchev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename method in MessageBrokerConfigurer
上级
930d1877
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
13 deletion
+13
-13
spring-messaging/src/main/java/org/springframework/messaging/simp/config/EnableWebSocketMessageBroker.java
...k/messaging/simp/config/EnableWebSocketMessageBroker.java
+1
-1
spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerConfigurer.java
...mework/messaging/simp/config/MessageBrokerConfigurer.java
+10
-10
spring-messaging/src/main/java/org/springframework/messaging/simp/config/WebSocketMessageBrokerConfigurationSupport.java
...mp/config/WebSocketMessageBrokerConfigurationSupport.java
+1
-1
spring-messaging/src/test/java/org/springframework/messaging/simp/handler/SimpAnnotationMethodIntegrationTests.java
...ng/simp/handler/SimpAnnotationMethodIntegrationTests.java
+1
-1
未找到文件。
spring-messaging/src/main/java/org/springframework/messaging/simp/config/EnableWebSocketMessageBroker.java
浏览文件 @
5915b23e
...
@@ -49,7 +49,7 @@ import org.springframework.context.annotation.Import;
...
@@ -49,7 +49,7 @@ import org.springframework.context.annotation.Import;
* @Bean
* @Bean
* public void configureMessageBroker(MessageBrokerConfigurer configurer) {
* public void configureMessageBroker(MessageBrokerConfigurer configurer) {
* configurer.enableStompBrokerRelay("/queue/", "/topic/");
* configurer.enableStompBrokerRelay("/queue/", "/topic/");
* configurer.setA
nnotationMethod
DestinationPrefixes("/app/");
* configurer.setA
pplication
DestinationPrefixes("/app/");
* }
* }
* }
* }
* </pre>
* </pre>
...
...
spring-messaging/src/main/java/org/springframework/messaging/simp/config/MessageBrokerConfigurer.java
浏览文件 @
5915b23e
...
@@ -37,7 +37,7 @@ public class MessageBrokerConfigurer {
...
@@ -37,7 +37,7 @@ public class MessageBrokerConfigurer {
private
StompBrokerRelayRegistration
stompRelay
;
private
StompBrokerRelayRegistration
stompRelay
;
private
String
[]
a
nnotationMethod
DestinationPrefixes
;
private
String
[]
a
pplication
DestinationPrefixes
;
private
String
userDestinationPrefix
;
private
String
userDestinationPrefix
;
...
@@ -67,10 +67,10 @@ public class MessageBrokerConfigurer {
...
@@ -67,10 +67,10 @@ public class MessageBrokerConfigurer {
}
}
/**
/**
* Configure one or more prefixes to filter destinations targeting a
nnotated
* Configure one or more prefixes to filter destinations targeting a
pplication
* a
pplication methods. For example destinations prefixed with "/app" may be processed
* a
nnotated methods. For example destinations prefixed with "/app" may be
*
by annotated application methods while other destinations may target the messag
e
*
processed by annotated methods while other destinations may target th
e
* broker (e.g. "/topic", "/queue").
*
message
broker (e.g. "/topic", "/queue").
* <p>
* <p>
* When messages are processed, the matching prefix is removed from the destination in
* 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
* order to form the lookup path. This means annotations should not contain the
...
@@ -78,8 +78,8 @@ public class MessageBrokerConfigurer {
...
@@ -78,8 +78,8 @@ public class MessageBrokerConfigurer {
* <p>
* <p>
* Prefixes that do not have a trailing slash will have one automatically appended.
* Prefixes that do not have a trailing slash will have one automatically appended.
*/
*/
public
MessageBrokerConfigurer
setA
nnotationMethodDestinationPrefixes
(
String
...
destinationP
refixes
)
{
public
MessageBrokerConfigurer
setA
pplicationDestinationPrefixes
(
String
...
p
refixes
)
{
this
.
a
nnotationMethodDestinationPrefixes
=
destinationP
refixes
;
this
.
a
pplicationDestinationPrefixes
=
p
refixes
;
return
this
;
return
this
;
}
}
...
@@ -118,9 +118,9 @@ public class MessageBrokerConfigurer {
...
@@ -118,9 +118,9 @@ public class MessageBrokerConfigurer {
return
(
this
.
stompRelay
!=
null
)
?
this
.
stompRelay
.
getMessageHandler
()
:
null
;
return
(
this
.
stompRelay
!=
null
)
?
this
.
stompRelay
.
getMessageHandler
()
:
null
;
}
}
protected
Collection
<
String
>
getA
nnotationMethod
DestinationPrefixes
()
{
protected
Collection
<
String
>
getA
pplication
DestinationPrefixes
()
{
return
(
this
.
a
nnotationMethod
DestinationPrefixes
!=
null
)
return
(
this
.
a
pplication
DestinationPrefixes
!=
null
)
?
Arrays
.
asList
(
this
.
a
nnotationMethod
DestinationPrefixes
)
:
null
;
?
Arrays
.
asList
(
this
.
a
pplication
DestinationPrefixes
)
:
null
;
}
}
protected
String
getUserDestinationPrefix
()
{
protected
String
getUserDestinationPrefix
()
{
...
...
spring-messaging/src/main/java/org/springframework/messaging/simp/config/WebSocketMessageBrokerConfigurationSupport.java
浏览文件 @
5915b23e
...
@@ -136,7 +136,7 @@ public abstract class WebSocketMessageBrokerConfigurationSupport {
...
@@ -136,7 +136,7 @@ public abstract class WebSocketMessageBrokerConfigurationSupport {
SimpAnnotationMethodMessageHandler
handler
=
SimpAnnotationMethodMessageHandler
handler
=
new
SimpAnnotationMethodMessageHandler
(
brokerMessagingTemplate
(),
webSocketResponseChannel
());
new
SimpAnnotationMethodMessageHandler
(
brokerMessagingTemplate
(),
webSocketResponseChannel
());
handler
.
setDestinationPrefixes
(
getMessageBrokerConfigurer
().
getA
nnotationMethod
DestinationPrefixes
());
handler
.
setDestinationPrefixes
(
getMessageBrokerConfigurer
().
getA
pplication
DestinationPrefixes
());
handler
.
setMessageConverter
(
simpMessageConverter
());
handler
.
setMessageConverter
(
simpMessageConverter
());
webSocketRequestChannel
().
subscribe
(
handler
);
webSocketRequestChannel
().
subscribe
(
handler
);
return
handler
;
return
handler
;
...
...
spring-messaging/src/test/java/org/springframework/messaging/simp/handler/SimpAnnotationMethodIntegrationTests.java
浏览文件 @
5915b23e
...
@@ -217,7 +217,7 @@ public class SimpAnnotationMethodIntegrationTests extends AbstractWebSocketInteg
...
@@ -217,7 +217,7 @@ public class SimpAnnotationMethodIntegrationTests extends AbstractWebSocketInteg
@Override
@Override
public
void
configureMessageBroker
(
MessageBrokerConfigurer
configurer
)
{
public
void
configureMessageBroker
(
MessageBrokerConfigurer
configurer
)
{
configurer
.
setA
nnotationMethod
DestinationPrefixes
(
"/app"
);
configurer
.
setA
pplication
DestinationPrefixes
(
"/app"
);
configurer
.
enableSimpleBroker
(
"/topic"
,
"/queue"
);
configurer
.
enableSimpleBroker
(
"/topic"
,
"/queue"
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录