Skip to content

Commit 4b55333

Browse files
committed
Document which @scheduled attributes support SpEL expressions
Closes gh-29290 (cherry picked from commit f8c8873)
1 parent c27acad commit 4b55333

File tree

1 file changed

+10
-1
lines changed
  • spring-context/src/main/java/org/springframework/scheduling/annotation

1 file changed

+10
-1
lines changed

spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -117,9 +117,12 @@
117117
* last invocation and the start of the next.
118118
* <p>The time unit is milliseconds by default but can be overridden via
119119
* {@link #timeUnit}.
120+
* <p>This attribute variant supports Spring-style "${...}" placeholders
121+
* as well as SpEL expressions.
120122
* @return the delay as a String value &mdash; for example, a placeholder
121123
* or a {@link java.time.Duration#parse java.time.Duration} compliant value
122124
* @since 3.2.2
125+
* @see #fixedDelay()
123126
*/
124127
String fixedDelayString() default "";
125128

@@ -135,9 +138,12 @@
135138
* Execute the annotated method with a fixed period between invocations.
136139
* <p>The time unit is milliseconds by default but can be overridden via
137140
* {@link #timeUnit}.
141+
* <p>This attribute variant supports Spring-style "${...}" placeholders
142+
* as well as SpEL expressions.
138143
* @return the period as a String value &mdash; for example, a placeholder
139144
* or a {@link java.time.Duration#parse java.time.Duration} compliant value
140145
* @since 3.2.2
146+
* @see #fixedRate()
141147
*/
142148
String fixedRateString() default "";
143149

@@ -156,9 +162,12 @@
156162
* {@link #fixedRate} or {@link #fixedDelay} task.
157163
* <p>The time unit is milliseconds by default but can be overridden via
158164
* {@link #timeUnit}.
165+
* <p>This attribute variant supports Spring-style "${...}" placeholders
166+
* as well as SpEL expressions.
159167
* @return the initial delay as a String value &mdash; for example, a placeholder
160168
* or a {@link java.time.Duration#parse java.time.Duration} compliant value
161169
* @since 3.2.2
170+
* @see #initialDelay()
162171
*/
163172
String initialDelayString() default "";
164173

0 commit comments

Comments
 (0)