问题
I try to set handshake handler
through xml config:
<bean id="customHandler" class="app.wsock.CustomHandler"/>
<websocket:message-broker>
<websocket:stomp-endpoint path="/foo">
<websocket:handshake-handler ref="customHandler"/>
<websocket:sockjs/>
</websocket:stomp-endpoint>
<websocket:stomp-broker-relay prefix="/topic,/queue" />
</websocket:message-broker>
but on connect also using DefaultHandshakeHandler. What I'm doing wrong?
回答1:
This is a bug (see SPR-11568). You'll need to update your app to Spring Framework 4.0.3.
来源:https://stackoverflow.com/questions/22447794/spring-websocket-set-handshake-handler-interceptor