Stéphane Nicoll opened SPR-16705 and commented
@EnableWebSocket may register a defaultSockJsTaskScheduler bean that could fallback to NoOpScheduler is no task scheduling is required (sic).
This conflicts with the default behaviour of @EnableScheduling. By default, it will look up for the unique presence of a TaskScheduler and, if one is found, it will use it.
Unfortunately, as soon as those two are in combinations (and @EnableWebSocket runs before @EnableScheduling), it breaks any app as a scheduling task is attempting to register itself to a no op scheduler.
The latter case is unfortunately quite common with Spring Boot as some auto-configurations (i.e. Spring Session Redis) rely on @EnableScheduling and users have @EnableWebSocket on their app to signal they want to use that feature.
Affects: 5.0.5
Issue Links:
Stéphane Nicoll opened SPR-16705 and commented
@EnableWebSocketmay register adefaultSockJsTaskSchedulerbean that could fallback toNoOpScheduleris no task scheduling is required (sic).This conflicts with the default behaviour of
@EnableScheduling. By default, it will look up for the unique presence of aTaskSchedulerand, if one is found, it will use it.Unfortunately, as soon as those two are in combinations (and
@EnableWebSocketruns before@EnableScheduling), it breaks any app as a scheduling task is attempting to register itself to a no op scheduler.The latter case is unfortunately quite common with Spring Boot as some auto-configurations (i.e. Spring Session Redis) rely on
@EnableSchedulingand users have@EnableWebSocketon their app to signal they want to use that feature.Affects: 5.0.5
Issue Links: