Motivation
Former IntegrationAutoConfiguration.IntegrationTaskSchedulerConfiguration was not aware of virtual threads. It means ThreadPoolTaskScheduler was instantiated regardless of capability of virtual threads when you use spring-boot-starter-integration.
Changes
Now IntegrationAutoConfiguration.IntegrationTaskSchedulerConfiguration determines a proper TaskScheduler bean to be instantiated via @ConditionalOnThreading.
If virtual threads is enabled, SimpleAsyncTaskScheduler will be instantiated, otherwise works as is.
This can resolve #41188.
Comment From: mhalbritter
Thanks a lot!
Comment From: facewise
@mhalbritter Oh, I think I made a broken test. Sorry.
I don't know how to run virtual threads enabled tests with @EnabledForJreRange(min = JRE.JAVA_21) on my pc.
Comment From: mhalbritter
Don't worry, I'll fix it. The command to run is gradle test -PtoolchainVersion=21.
Comment From: facewise
Thank you.