Skip to content

Commit 18f4dbd

Browse files
committed
Merge pull request #45232 from nosan
* pr/45232: Polish contribution Document that a bootstrap executor for the context is auto-configured Closes gh-45232
2 parents 307dff2 + f797fab commit 18f4dbd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/task-execution-and-scheduling.adoc

+7-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ The auto-configured javadoc:org.springframework.core.task.AsyncTaskExecutor[] is
1212
- Asynchronous request handling in Spring MVC.
1313
- Support for blocking execution in Spring WebFlux.
1414
- Utilized for inbound and outbound message channels in Spring WebSocket.
15-
- Acts as a bootstrap executor for JPA, based on the bootstrap mode of JPA repositories.
15+
- Bootstrap executor for JPA, based on the bootstrap mode of JPA repositories.
16+
- Bootstrap Executor for {url-spring-framework-docs}/core/beans/java/composing-configuration-classes.html#beans-java-startup-background[background initialization] of beans in the `ApplicationContext`.
1617

1718
While this approach works in most scenarios, Spring Boot allows you to override the auto-configured javadoc:org.springframework.core.task.AsyncTaskExecutor[].
1819
By default, when a custom javadoc:java.util.concurrent.Executor[] bean is registered, the auto-configured javadoc:org.springframework.core.task.AsyncTaskExecutor[] backs off, and the custom javadoc:java.util.concurrent.Executor[] is used for regular task execution (via javadoc:org.springframework.scheduling.annotation.EnableAsync[format=annotation]).
@@ -22,7 +23,9 @@ For Spring MVC and Spring WebFlux, this bean must be of type javadoc:org.springf
2223

2324
Spring WebSocket and JPA will use javadoc:org.springframework.core.task.AsyncTaskExecutor[] if either a single bean of this type is available or a bean named `applicationTaskExecutor` is defined.
2425

25-
The following code snippet demonstrates how to register a custom javadoc:org.springframework.core.task.AsyncTaskExecutor[] to be used with Spring MVC, Spring WebFlux, Spring GraphQL, Spring WebSocket and JPA.
26+
Finally, the boostrap executor of the `ApplicationContext` uses a bean named `applicationTaskExecutor` unless a bean named `bootstrapExecutor` is defined.
27+
28+
The following code snippet demonstrates how to register a custom javadoc:org.springframework.core.task.AsyncTaskExecutor[] to be used with Spring MVC, Spring WebFlux, Spring GraphQL, Spring WebSocket, JPA, and background initialization of beans.
2629

2730
include-code::application/MyTaskExecutorConfiguration[]
2831

@@ -79,7 +82,8 @@ These integrations include:
7982
- Spring MVC's asynchronous request processing.
8083
- Spring WebFlux's blocking execution support.
8184
- Utilized for inbound and outbound message channels in Spring WebSocket.
82-
- Acts as a bootstrap executor for JPA, based on the bootstrap mode of JPA repositories.
85+
- Bootstrap executor for JPA, based on the bootstrap mode of JPA repositories.
86+
- Bootstrap Executor for {url-spring-framework-docs}/core/beans/java/composing-configuration-classes.html#beans-java-startup-background[background initialization] of beans in the `ApplicationContext`, unless a bean named `bootstrapExecutor` is defined.
8387

8488
[TIP]
8589
====

0 commit comments

Comments
 (0)