Skip to content

Commit f8c8873

Browse files
committed
Document which @scheduled attributes support SpEL expressions
Closes gh-29290
1 parent cc8c852 commit f8c8873

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.
@@ -122,9 +122,12 @@
122122
* last invocation and the start of the next.
123123
* <p>The time unit is milliseconds by default but can be overridden via
124124
* {@link #timeUnit}.
125+
* <p>This attribute variant supports Spring-style "${...}" placeholders
126+
* as well as SpEL expressions.
125127
* @return the delay as a String value &mdash; for example, a placeholder
126128
* or a {@link java.time.Duration#parse java.time.Duration} compliant value
127129
* @since 3.2.2
130+
* @see #fixedDelay()
128131
*/
129132
String fixedDelayString() default "";
130133

@@ -140,9 +143,12 @@
140143
* Execute the annotated method with a fixed period between invocations.
141144
* <p>The time unit is milliseconds by default but can be overridden via
142145
* {@link #timeUnit}.
146+
* <p>This attribute variant supports Spring-style "${...}" placeholders
147+
* as well as SpEL expressions.
143148
* @return the period as a String value &mdash; for example, a placeholder
144149
* or a {@link java.time.Duration#parse java.time.Duration} compliant value
145150
* @since 3.2.2
151+
* @see #fixedRate()
146152
*/
147153
String fixedRateString() default "";
148154

@@ -161,9 +167,12 @@
161167
* {@link #fixedRate} or {@link #fixedDelay} task.
162168
* <p>The time unit is milliseconds by default but can be overridden via
163169
* {@link #timeUnit}.
170+
* <p>This attribute variant supports Spring-style "${...}" placeholders
171+
* as well as SpEL expressions.
164172
* @return the initial delay as a String value &mdash; for example, a placeholder
165173
* or a {@link java.time.Duration#parse java.time.Duration} compliant value
166174
* @since 3.2.2
175+
* @see #initialDelay()
167176
*/
168177
String initialDelayString() default "";
169178

0 commit comments

Comments
 (0)