2014-03-28 29 views
1

我在spring網絡套接字中看到文檔Spring WebSockets下面的代碼在下20.4.11配置和性能。我很驚訝沒有方法作爲以及目前沒有課程WebSocketTransportRegistration。我正在使用Spring web套接字4.0.2.RELEASE。Spring應用程序不在tomcat 7.0.47中加載,而是在Tomcat 7.0.34中加載

@Configuration 
@EnableWebSocketMessageBroker 
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { 

    @Override 
    public void configureWebSocketTransport(WebSocketTransportRegistration registration) { 
     registration.setSendTimeLimit(15 * 1000).setSendBufferSizeLimit(512 * 1024); 
    } 

    // ... 
} 

我缺少什麼?

回答

1

WebSocketTransportRegistration僅在4.0.3版本中添加,因此您需要更新項目才能使用該版本(或更新版本)。

+0

哦謝謝...讓我試試 –

+0

太棒了,讓我知道它是如何爲你服務的。 – dectarin

相關問題