mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-24 18:29:03 +00:00
This commit updates `TaskExecutionAutoConfiguration` to permit the auto-configuration of a `TaskExecutor` even if a user-defined `Executor` bean is present. Such `Executor` may have been created for totally unrelated reason, and it may or may not be an `AsyncTaskExecutor`. The default behavior has not changed, but this commit provides a new property, `spring.task.execution.mode` that can be set to `force` to auto-configure the `TaskExecutor` anyway. Because this mode made it so that two `Executor` will be present in the context, this commit also automatically configures an `AsyncConfigurer` if none is present already to make sure task processing uses the auto-configured TaskExecutor. Closes gh-44659