Class WebSocketAutoConfiguration


  • @Configuration
    @ConditionalOnClass({javax.servlet.Servlet.class,javax.websocket.server.ServerContainer.class})
    @ConditionalOnWebApplication
    public class WebSocketAutoConfiguration
    extends Object
    Auto configuration for websocket server in embedded Tomcat, Jetty or Undertow. Requires the appropriate WebSocket modules to be on the classpath.

    If Tomcat's WebSocket support is detected on the classpath we add a customizer that installs the Tomcat Websocket initializer. In a non-embedded container it should already be there.

    If Jetty's WebSocket support is detected on the classpath we add a configuration that configures the context with WebSocket support. In a non-embedded container it should already be there.

    If Undertow's WebSocket support is detected on the classpath we add a customizer that installs the Undertow Websocket DeploymentInfo Customizer. In a non-embedded container it should already be there.