Fix Jetty WebSocket test failures for WebFlux
See gh-27424
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,6 +20,7 @@ import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.ServerConnector;
|
||||
import org.eclipse.jetty.servlet.ServletContextHandler;
|
||||
import org.eclipse.jetty.servlet.ServletHolder;
|
||||
import org.eclipse.jetty.websocket.server.config.JettyWebSocketServletContainerInitializer;
|
||||
|
||||
import org.springframework.http.server.reactive.JettyHttpHandlerAdapter;
|
||||
import org.springframework.http.server.reactive.ServletHttpHandlerAdapter;
|
||||
@@ -45,6 +46,7 @@ public class JettyHttpServer extends AbstractHttpServer {
|
||||
|
||||
this.contextHandler = new ServletContextHandler(this.jettyServer, "", false, false);
|
||||
this.contextHandler.addServlet(servletHolder, "/");
|
||||
this.contextHandler.addServletContainerInitializer(new JettyWebSocketServletContainerInitializer());
|
||||
this.contextHandler.start();
|
||||
|
||||
ServerConnector connector = new ServerConnector(this.jettyServer);
|
||||
|
||||
Reference in New Issue
Block a user