Spring websocket set handshake handler/interceptor

依然范特西╮ 提交于 2019-12-24 00:44:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!