Add ThreadPoolTaskSchedulerBuilder and deprecate TaskSchedulerBuilder

Closes gh-36651
This commit is contained in:
Moritz Halbritter
2023-08-01 10:32:58 +02:00
parent 922f66a85d
commit 51008a7d39
11 changed files with 567 additions and 34 deletions

View File

@@ -49,5 +49,5 @@ The thread pool uses one thread by default and its settings can be fine-tuned us
size: 2
----
A `ThreadPoolTaskExecutorBuilder` bean, a `SimpleAsyncTaskExecutorBuilder` bean and a `TaskSchedulerBuilder` bean are made available in the context if a custom executor or scheduler needs to be created.
A `ThreadPoolTaskExecutorBuilder` bean, a `SimpleAsyncTaskExecutorBuilder` bean and a `ThreadPoolTaskSchedulerBuilder` bean are made available in the context if a custom executor or scheduler needs to be created.
The `SimpleAsyncTaskExecutorBuilder` is auto-configured to use virtual threads if they are enabled (using Java 21+ and configprop:spring.threads.virtual.enabled[] set to `true`).