Skip to content

Commit d0a1ba5

Browse files
committed
Merge branch '6.2.x'
2 parents b98ef13 + 4466548 commit d0a1ba5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

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

Lines changed: 7 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-2025 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.
@@ -146,6 +146,12 @@
146146
* compile-time weaving or load-time weaving applying the aspect to the affected classes.
147147
* There is no proxy involved in such a scenario; local calls will be intercepted as well.
148148
*
149+
* <p><b>Note: {@code @EnableAsync} applies to its local application context only,
150+
* allowing for selective activation at different levels.</b> Please redeclare
151+
* {@code @EnableAsync} in each individual context, for example, the common root web
152+
* application context and any separate {@code DispatcherServlet} application contexts,
153+
* if you need to apply its behavior at multiple levels.
154+
*
149155
* @author Chris Beams
150156
* @author Juergen Hoeller
151157
* @author Stephane Nicoll

spring-web/src/main/java/org/springframework/web/context/ConfigurableWebEnvironment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2025 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.
@@ -39,7 +39,7 @@ public interface ConfigurableWebEnvironment extends ConfigurableEnvironment {
3939
* org.springframework.core.env.PropertySource.StubPropertySource stub property source}
4040
* instances acting as placeholders with real servlet context/config property sources
4141
* using the given parameters.
42-
* @param servletContext the {@link ServletContext} (may not be {@code null})
42+
* @param servletContext the {@link ServletContext} ({@code null} if not available)
4343
* @param servletConfig the {@link ServletConfig} ({@code null} if not available)
4444
* @see org.springframework.web.context.support.WebApplicationContextUtils#initServletPropertySources(
4545
* org.springframework.core.env.MutablePropertySources, ServletContext, ServletConfig)

0 commit comments

Comments
 (0)