Skip to content

Revisit how applicationTaskExecutor is utilized across various Spring integrations #44946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nosan opened this issue Mar 29, 2025 · 1 comment
Labels
for: team-meeting An issue we'd like to discuss as a team to make progress status: pending-design-work Needs design work before any code can be developed status: waiting-for-triage An issue we've not yet triaged

Comments

@nosan
Copy link
Contributor

nosan commented Mar 29, 2025

The current setup seems complex and might need reconsideration.

Spring MVC, Spring WebFlux, and Spring GraphQL all rely on a bean named
applicationTaskExecutor. For Spring MVC and Spring WebFlux (spring.threads.virtual.enabled=true), this bean must be of type AsyncTaskExecutor, whereas Spring GraphQL requires a bean of type Executor.

Spring WebSocket and JPA will use an AsyncTaskExecutor if either a single bean of this
type is available or if a bean named applicationTaskExecutor is defined.

I suggest revisiting the WebSocketMessageConverterConfiguration and
JpaRepositoriesAutoConfiguration configurations to align them with Spring MVC,
Spring WebFlux, and Spring GraphQL.

I am uncertain about GraphQL as it uses applicationTaskExecutor but with a different
type.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 29, 2025
shivammm21 added a commit to shivammm21/spring-boot that referenced this issue Apr 1, 2025
This commit provides a more consistent way to access the applicationTaskExecutor bean across different Spring integrations by enhancing the ApplicationTaskExecutorBuilder. It updates MVC, WebFlux, and GraphQL to follow the same pattern, provides better type safety, and improves documentation.

Fixes spring-projects#44946

Signed-off-by: Shivam Thorat <shivamthorat2103@gmail.com>
@wilkinsona wilkinsona added status: pending-design-work Needs design work before any code can be developed for: team-meeting An issue we'd like to discuss as a team to make progress labels Apr 1, 2025
@mcedeno1

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: team-meeting An issue we'd like to discuss as a team to make progress status: pending-design-work Needs design work before any code can be developed status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants