From 7a221eb58136ad3fabc644d015e74ff471be4f03 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 6 Dec 2023 18:00:37 +0100 Subject: [PATCH] =?UTF-8?q?Update=20Javadoc=20for=20@=E2=81=A0ComponentSca?= =?UTF-8?q?n=20regarding=20local=20overrides?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See gh-31704 --- .../springframework/context/annotation/ComponentScan.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ComponentScan.java b/spring-context/src/main/java/org/springframework/context/annotation/ComponentScan.java index eb38609aa7e..0437a3c325e 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ComponentScan.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ComponentScan.java @@ -53,6 +53,12 @@ import org.springframework.core.type.filter.TypeFilter; * annotation. {@code @ComponentScan} may also be used as a meta-annotation * to create custom composed annotations with attribute overrides. * + *

Locally declared {@code @ComponentScan} annotations always take precedence + * over and effectively hide {@code @ComponentScan} meta-annotations, + * which allows explicit local configuration to override configuration that is + * meta-present (including composed annotations meta-annotated with + * {@code @ComponentScan}). + * * @author Chris Beams * @author Juergen Hoeller * @author Sam Brannen