Skip to content

Commit 8136db6

Browse files
committed
Merge branch '2.1.x'
2 parents 5e736c0 + d499277 commit 8136db6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6361,11 +6361,24 @@ in a similar manner, as shown in the following example:
63616361

63626362
[[boot-features-task-execution-scheduling]]
63636363
== Task Execution and Scheduling
6364-
In the absence of a `TaskExecutor` bean in the context, Spring Boot auto-configures a
6364+
In the absence of an `Executor` bean in the context, Spring Boot auto-configures a
63656365
`ThreadPoolTaskExecutor` with sensible defaults that can be automatically associated to
63666366
asynchronous task execution (`@EnableAsync`) and Spring MVC asynchronous request
63676367
processing.
63686368

6369+
[TIP]
6370+
====
6371+
If you have defined a custom `Executor` in the context, regular task execution (i.e.
6372+
`@EnableAsync`) will use it transparently but the Spring MVC support will not be
6373+
configured as it requires an `AsyncTaskExecutor` implementation (named
6374+
`applicationTaskExecutor`). Depending on your target arrangement, you could change your
6375+
`Executor` into a `ThreadPoolTaskExecutor` or define both a `ThreadPoolTaskExecutor` and
6376+
an `AsyncConfigurer` wrapping your custom `Executor`.
6377+
6378+
The auto-configured `TaskExecutorBuilder` allows you to easily create instances that
6379+
reproduces what the auto-configuration does by default.
6380+
====
6381+
63696382
The thread pool uses 8 core threads that can grow and shrink according to the load. Those
63706383
default settings can be fine-tuned using the `spring.task.execution` namespace as shown in
63716384
the following example:

0 commit comments

Comments
 (0)