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 @@ -6359,11 +6359,24 @@ in a similar manner, as shown in the following example:
6359
6359
6360
6360
[[boot-features-task-execution-scheduling]]
6361
6361
== Task Execution and Scheduling
6362
- In the absence of a `TaskExecutor ` bean in the context, Spring Boot auto-configures a
6362
+ In the absence of an `Executor ` bean in the context, Spring Boot auto-configures a
6363
6363
`ThreadPoolTaskExecutor` with sensible defaults that can be automatically associated to
6364
6364
asynchronous task execution (`@EnableAsync`) and Spring MVC asynchronous request
6365
6365
processing.
6366
6366
6367
+ [TIP]
6368
+ ====
6369
+ If you have defined a custom `Executor` in the context, regular task execution (i.e.
6370
+ `@EnableAsync`) will use it transparently but the Spring MVC support will not be
6371
+ configured as it requires an `AsyncTaskExecutor` implementation (named
6372
+ `applicationTaskExecutor`). Depending on your target arrangement, you could change your
6373
+ `Executor` into a `ThreadPoolTaskExecutor` or define both a `ThreadPoolTaskExecutor` and
6374
+ an `AsyncConfigurer` wrapping your custom `Executor`.
6375
+
6376
+ The auto-configured `TaskExecutorBuilder` allows you to easily create instances that
6377
+ reproduces what the auto-configuration does by default.
6378
+ ====
6379
+
6367
6380
The thread pool uses 8 core threads that can grow and shrink according to the load. Those
6368
6381
default settings can be fine-tuned using the `spring.task.execution` namespace as shown in
6369
6382
the following example:
You can’t perform that action at this time.
0 commit comments