File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
spring-boot-project/spring-boot-docs/src/main/asciidoc Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff 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
63666366asynchronous task execution (`@EnableAsync`) and Spring MVC asynchronous request
63676367processing.
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+
63696382The thread pool uses 8 core threads that can grow and shrink according to the load. Those
63706383default settings can be fine-tuned using the `spring.task.execution` namespace as shown in
63716384the following example:
You can’t perform that action at this time.
0 commit comments