-
Notifications
You must be signed in to change notification settings - Fork 95
Description
I think this example misses the association between the task executor and the service in an unfortunate way, i.e. how this is being set up (quote from the Javadoc): "By default, Spring will be searching for an associated thread pool definition: either a unique TaskExecutor bean in the context, or an Executor bean named "taskExecutor" otherwise. If neither of the two is resolvable, a SimpleAsyncTaskExecutor will be used to process async method invocations."
I think it could be beneficial for this guide, and for the possibility of using this code as a template, to add an explicit association between the executor and the async service by naming the executor bean and specifying the name of if in the @async annotation.
Otherwise I think it would be good to rename the the Executor bean to the expected name "taskExecutor"