Add support for custom message converters

The Java and XML config for STOMP WebSocket applications now supports
configuring message converters.

Issue: SPR-11184
This commit is contained in:
Rossen Stoyanchev
2014-01-07 16:16:29 -05:00
parent 1fa4d9169f
commit 4342497305
14 changed files with 406 additions and 169 deletions

View File

@@ -0,0 +1,19 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:websocket="http://www.springframework.org/schema/websocket"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/websocket http://www.springframework.org/schema/websocket/spring-websocket-4.0.xsd">
<websocket:message-broker>
<websocket:stomp-endpoint path="/foo" />
<websocket:simple-broker />
<websocket:message-converters register-defaults="false">
<bean class="org.springframework.messaging.converter.StringMessageConverter"/>
</websocket:message-converters>
</websocket:message-broker>
</beans>

View File

@@ -0,0 +1,19 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:websocket="http://www.springframework.org/schema/websocket"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/websocket http://www.springframework.org/schema/websocket/spring-websocket-4.0.xsd">
<websocket:message-broker>
<websocket:stomp-endpoint path="/foo" />
<websocket:simple-broker />
<websocket:message-converters>
<bean class="org.springframework.messaging.converter.StringMessageConverter"/>
</websocket:message-converters>
</websocket:message-broker>
</beans>