Polish contribution
See gh-27818
This commit is contained in:
@@ -24,7 +24,8 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotation that marks a method as a candidate for <i>asynchronous</i> execution.
|
||||
* Can also be used at the type level, in which case all of the type's methods are
|
||||
*
|
||||
* <p>Can also be used at the type level, in which case all of the type's methods are
|
||||
* considered as asynchronous. Note, however, that {@code @Async} is not supported
|
||||
* on methods declared within a
|
||||
* {@link org.springframework.context.annotation.Configuration @Configuration} class.
|
||||
@@ -41,7 +42,7 @@ import java.lang.annotation.Target;
|
||||
* {@code Future} that can be used to track the result of the asynchronous method
|
||||
* execution. However, since the target method needs to implement the same signature,
|
||||
* it will have to return a temporary {@code Future} handle that just passes a value
|
||||
* through: e.g. Spring's {@link AsyncResult}, EJB 3.1's {@link jakarta.ejb.AsyncResult},
|
||||
* through: for example, Spring's {@link AsyncResult}, EJB 3.1's {@link jakarta.ejb.AsyncResult},
|
||||
* or {@link java.util.concurrent.CompletableFuture#completedFuture(Object)}.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
@@ -57,16 +58,18 @@ public @interface Async {
|
||||
|
||||
/**
|
||||
* A qualifier value for the specified asynchronous operation(s).
|
||||
* <p>The value support expression such as <code>#{systemProperties.myExecutor}</code>
|
||||
* or property placeholder such as <code>${my.app.myExecutor}</code>.
|
||||
* <p>May be used to determine the target executor to be used when executing
|
||||
* the asynchronous operation(s), matching the qualifier value (or the bean
|
||||
* name) of a specific {@link java.util.concurrent.Executor Executor} or
|
||||
* {@link org.springframework.core.task.TaskExecutor TaskExecutor}
|
||||
* bean definition.
|
||||
* <p>When specified on a class-level {@code @Async} annotation, indicates that the
|
||||
* <p>When specified in a class-level {@code @Async} annotation, indicates that the
|
||||
* given executor should be used for all methods within the class. Method-level use
|
||||
* of {@code Async#value} always overrides any value set at the class level.
|
||||
* of {@code Async#value} always overrides any qualifier value configured at
|
||||
* the class level.
|
||||
* <p>The qualifier value will be resolved dynamically if supplied as a SpEL
|
||||
* expression (for example, {@code "#{environment['myExecutor']}"}) or a
|
||||
* property placeholder (for example, {@code "${my.app.myExecutor}"}).
|
||||
* @since 3.1.2
|
||||
*/
|
||||
String value() default "";
|
||||
|
||||
Reference in New Issue
Block a user