When there are more than 1 TaskExecutors bean defined in the application, the whole stack trace will be printed.
And with statement "Could not find unique TaskExecutor bean"
only.
The statement can be improved such that, "Could not find unique TaskExecutor bean, continue to find the bean using name {DEFAULT_TASK_EXECUTOR_BEAN_NAME}"
,
This statement can also be shown after the targeted bean is resolved successfully.
https://github.com/spring-projects/spring-framework/blob/786d80c0bbae28aa703df94065992e9377086617/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionAspectSupport.java#L236
Comment From: sbrannen
Hi @tombyong,
Thanks for raising your first issue for the Spring Framework!
I don't think we should switch from DEBUG to WARN for that log statement, since the algorithm continues its search. Logging at DEBUG level for that intermediate step is consistent with how we approach such things.
However, I agree that mentioning that the algorithm continues to search for a bean named taskExecutor
can provide helpful context to someone reading the logs. So I'll make a change along those lines.
Comment From: junyongz
thanks @sbrannen !