我尝试通过 xml 配置设置握手处理程序
:
<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>
但在连接时也使用 DefaultHandshakeHandler。我做错了什么?
最佳答案
这是一个错误(请参阅 SPR-11568 )。 您需要将应用程序更新到 Spring Framework 4.0.3。
关于spring-websocket - Spring websocket设置握手处理程序/拦截器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22447794/