From dd1ac616f39f0ed1cc6b0ad148eaac4889b767b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Wed, 26 Mar 2025 16:06:06 +0100 Subject: [PATCH] Clarify the behavior if multiple Executor beans are present Closes gh-44907 --- .../pages/features/task-execution-and-scheduling.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/task-execution-and-scheduling.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/task-execution-and-scheduling.adoc index eaceb6d0d45..ddc39edd63c 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/task-execution-and-scheduling.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/task-execution-and-scheduling.adoc @@ -20,6 +20,13 @@ Depending on your target arrangement, you could change your javadoc:java.util.co The auto-configured javadoc:org.springframework.boot.task.ThreadPoolTaskExecutorBuilder[] allows you to easily create instances that reproduce what the auto-configuration does by default. ==== +[NOTE] +==== +If multiple javadoc:java.util.concurrent.Executor[] beans are defined, regular task execution fallbacks to a bean named `taskExecutor`. +GraphQL, Spring MVC and Spring WebFlux support fallback to a bean named `applicationTaskExecutor`. +==== + + When a javadoc:org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor[] is auto-configured, the thread pool uses 8 core threads that can grow and shrink according to the load. Those default settings can be fine-tuned using the `spring.task.execution` namespace, as shown in the following example: