-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Auto-configure a sensible TaskExecutor #1563
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
Comments
See also #1397 |
@snicoll Did we discuss this briefly already? any thoughts? |
I don't think we did but if we feel we should change Spring's own defaults we should just do it. This may require a larger discussion though (as mentioned by your link) |
1 task
snicoll
added a commit
to snicoll/spring-boot
that referenced
this issue
Aug 2, 2018
This commit adds support for configuring a ThreadPoolTaskExecutor as well as auto-configuration when it makes sense. A ThreadPoolTaskExecutor can be easily built using TaskExecutorBuilder that is available as a bean. The default builder can be initialized using the `spring.task.*`namespace. As the necessary classes to setup such pool are always present, only the builder is made available by default. If `@EnableAsync` is detected and no TaskExecutor was configured, the one produced by the builder is exposed automatically. See spring-projectsgh-1563
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it would be really nice if spring-boot has an auto-configuration for the
AsyncTaskExecutor
. So if an@EnableAsync
is found aAsyncTaskExecutor
bean is provided based on the environment. If there is support for jsr236 (e.g. wildfly) theDefaultManagedTaskExecutor
is used by looking in jndi and when not aThreadPoolTaskExecutor
or aSimpleAsyncTaskExecutor
is used.Perhaps this can be combined with the
@EnableScheduling
configurationThe text was updated successfully, but these errors were encountered: