Skip to content

Commit b39ce80

Browse files
committed
Doc: @EnableScheduling needs to be declared per application context
Issue: SPR-16852
1 parent c754232 commit b39ce80

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: spring-context/src/main/java/org/springframework/scheduling/annotation/EnableScheduling.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -187,6 +187,12 @@
187187
* but one demonstration how the code-based approach allows for maximum configurability
188188
* through direct access to actual componentry.<p>
189189
*
190+
* <b>Note: {@code @EnableScheduling} applies to its local application context only,
191+
* allowing for selective scheduling of beans at different levels.</b> Please redeclare
192+
* {@code @EnableScheduling} in each individual context, e.g. the common root web
193+
* application context and any separate {@code DispatcherServlet} application contexts,
194+
* if you need to apply its behavior at multiple levels.
195+
*
190196
* @author Chris Beams
191197
* @author Juergen Hoeller
192198
* @since 3.1

0 commit comments

Comments
 (0)