spring-projects / spring-projects/spring-boot
Revisit how applicationTaskExecutor is utilized across various Spring integrations
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading WebSocketMessageConverterConfiguration and JpaRepositoriesAutoConfiguration, then trace how applicationTaskExecutor is selected by the Spring MVC, WebFlux, and GraphQL integrations described in the issue. Resolve the Executor versus AsyncTaskExecutor expectations before changing either configuration. Done means the WebSocket and JPA configurations have an agreed, consistent executor-selection behavior with the other integrations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100