Search code examples
springspring-websocket

Spring application is not loading in tomcat 7.0.47 but is loading in Tomcat 7.0.34


I saw in spring web sockets documentation Spring WebSockets the below code under 20.4.11 Configuration and Performance.I was surprised there is no method as well as there is no class WebSocketTransportRegistration present. I am using Spring web sockets 4.0.2.RELEASE.

@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {

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

    // ...
}

What i am missing?


Solution

  • WebSocketTransportRegistration was only added in the 4.0.3 release so you will need to update your project to use that version (or newer) instead.