diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java index fdbd4baa7c2..10b2f7dd4b8 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java @@ -96,7 +96,13 @@ import org.springframework.core.Ordered; * the examples are equivalent save the setting of the thread name prefix of the * Executor; this is because the the {@code task:} namespace {@code executor} element does * not expose such an attribute. This demonstrates how the code-based approach allows for - * maximum configurability through direct access to actual componentry.

+ * maximum configurability through direct access to actual componentry. + * + *

Note: In the above example the {@code ThreadPoolTaskExecutor} is not a fully managed + * Spring Bean. Add the {@code @Bean} annotation to the {@code getAsyncExecutor()} method + * if you want a fully managed bean. In such circumstances it is no longer necessary to + * manually call the {@code executor.initialize()} method as this will be invoked + * automatically when the bean is initialized. * * @author Chris Beams * @since 3.1