【问题标题】:Spring application is not loading in tomcat 7.0.47 but is loading in Tomcat 7.0.34Spring 应用程序未在 tomcat 7.0.47 中加载,但在 Tomcat 7.0.34 中加载
【发布时间】:2014-03-28 15:27:42
【问题描述】:

我在 spring web sockets 文档Spring WebSockets 中看到了 20.4.11 配置和性能下的以下代码。我很惊讶没有方法,也没有 WebSocketTransportRegistration 类。我正在使用 Spring Web 套接字 4.0.2.RELEASE。

@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {

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

    // ...
}

我错过了什么?

【问题讨论】:

    标签: spring spring-websocket


    【解决方案1】:

    WebSocketTransportRegistration 仅在 4.0.3 版本中添加,因此您需要更新您的项目以使用该版本(或更高版本)。

    【讨论】:

    • 太好了,让我知道你的情况如何。
    猜你喜欢
    • 2017-07-04
    • 2017-12-31
    • 1970-01-01
    • 2017-04-29
    • 2011-05-20
    • 2013-05-05
    • 1970-01-01
    • 2017-12-17
    • 2014-07-17
    相关资源
    最近更新 更多