Description
Slava Semushin opened SPR-14793 and commented
The sentence
To be used on
@Configuration
classes as follows, where MyAsyncBean is a user-defined type with one or more methods annotated with either Spring's@Async
annotation ...
maybe understanding wrong.
For example, should I add @EnableAsync
to all configuration classes that contain @Async
beans? Is it possible to place @EnableAsync
on one configuration and put the beans with @Async
to another configuration?
Here is a quote from to Andy Wilkinson in gitter:
They can be in separate locations
@EnableAsync
needs to go on a@Configuration
class
I think that documentation could be improved.
Reference URL: http://docs.spring.io/spring/docs/4.3.x/javadoc-api/org/springframework/scheduling/annotation/EnableAsync.html
Issue Links:
- Document supported return types for @Async methods [SPR-14881] #19447 Document supported return types for
@Async
methods
Referenced from: commits 7a8bf8e, fe59bc2, ab232a5
Backported to: 4.2.9