Explicit note on scheduled methods with a return value
Issue: SPR-14195
This commit is contained in:
parent
ce2f28da49
commit
b331ad5b2a
|
@ -24,12 +24,13 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation that marks a method to be scheduled. Exactly one of the
|
* An annotation that marks a method to be scheduled. Exactly one of
|
||||||
* {@link #cron()}, {@link #fixedDelay()}, or {@link #fixedRate()}
|
* the {@link #cron()}, {@link #fixedDelay()}, or {@link #fixedRate()}
|
||||||
* attributes must be specified.
|
* attributes must be specified.
|
||||||
*
|
*
|
||||||
* <p>The annotated method must expect no arguments and have a
|
* <p>The annotated method must expect no arguments. It will typically have
|
||||||
* {@code void} return type.
|
* a {@code void} return type; if not, the returned value will be ignored
|
||||||
|
* when called through the scheduler.
|
||||||
*
|
*
|
||||||
* <p>Processing of {@code @Scheduled} annotations is performed by
|
* <p>Processing of {@code @Scheduled} annotations is performed by
|
||||||
* registering a {@link ScheduledAnnotationBeanPostProcessor}. This can be
|
* registering a {@link ScheduledAnnotationBeanPostProcessor}. This can be
|
||||||
|
|
|
@ -293,7 +293,9 @@
|
||||||
<xsd:attribute name="method" type="xsd:string" use="required">
|
<xsd:attribute name="method" type="xsd:string" use="required">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
The name of the method to be invoked.
|
The name of the method to be invoked. The target method must expect no arguments.
|
||||||
|
It will typically have a void return type; if not, the returned value will be
|
||||||
|
ignored when called through the scheduler.
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
<xsd:appinfo>
|
<xsd:appinfo>
|
||||||
<tool:annotation>
|
<tool:annotation>
|
||||||
|
|
Loading…
Reference in New Issue