1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xmlns:context="http://www.springframework.org/schema/context"
5 xmlns:websocket="http://www.springframework.org/schema/websocket"
7 xsi:schemaLocation="http://www.springframework.org/schema/beans
8 http://www.springframework.org/schema/beans/spring-beans.xsd
9 http://www.springframework.org/schema/context
10 http://www.springframework.org/schema/context/spring-context.xsd
11 http://www.springframework.org/schema/websocket
12 http://www.springframework.org/schema/websocket/spring-websocket.xsd">
15 Searches for beans in packages (instead of XML configuration we can use
16 in this way annotations like @Service, @Endpoint, etc, etc)
18 <context:component-scan base-package="de.spring.stomp"/>
21 <bean class="org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean">
22 <property name="maxTextMessageBufferSize" value="8192"/>
23 <property name="maxBinaryMessageBufferSize" value="8192"/>
27 <websocket:message-broker application-destination-prefix="/app">
28 <websocket:stomp-endpoint path="/portfolio">
30 </websocket:stomp-endpoint>
32 Full-featured broker, see: http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html#websocket-stomp-handle-broker-relay
33 <websocket:stomp-broker-relay prefix="/topic,/queue" />
35 <websocket:simple-broker prefix="/topic, /queue"/>
36 </websocket:message-broker>