diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java index 3a6994cb7ee4..7ef20771e096 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java @@ -80,7 +80,7 @@ protected void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { * */ @Bean - public DefaultSockJsSchedulerContainer defaultSockJsSchedulerContainer() { + DefaultSockJsSchedulerContainer defaultSockJsSchedulerContainer() { return (initHandlerRegistry().requiresTaskScheduler() ? new DefaultSockJsSchedulerContainer(initDefaultSockJsScheduler()) : new DefaultSockJsSchedulerContainer(null));