diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java index 0c0ab9d1a94..8a9fd350b04 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/servlet/GraphQlWebMvcAutoConfiguration.java @@ -69,7 +69,6 @@ import org.springframework.web.servlet.function.ServerResponse; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import org.springframework.web.socket.server.support.WebSocketHandlerMapping; -import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler; /** * {@link EnableAutoConfiguration Auto-configuration} for enabling Spring GraphQL over @@ -191,7 +190,7 @@ public class GraphQlWebMvcAutoConfiguration { WebSocketHandlerMapping mapping = new WebSocketHandlerMapping(); mapping.setWebSocketUpgradeMatch(true); mapping.setUrlMap(Collections.singletonMap(path, - new WebSocketHttpRequestHandler(handler, new DefaultHandshakeHandler()))); + handler.asWebSocketHttpRequestHandler(new DefaultHandshakeHandler()))); mapping.setOrder(2); // Ahead of HTTP endpoint ("routerFunctionMapping" bean) return mapping; }