From d86750372a24c37a7ebe6bebde254f827dfbf65a Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 6 Jul 2023 17:12:45 +0200 Subject: [PATCH] Improve Javadoc for @Configuration --- .../context/annotation/Configuration.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java b/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java index 17633580bd8..74641040877 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java @@ -83,12 +83,13 @@ import org.springframework.stereotype.Component; * *

Via component scanning

* - *

{@code @Configuration} is meta-annotated with {@link Component @Component}, therefore - * {@code @Configuration} classes are candidates for component scanning (typically using - * Spring XML's {@code } element) and therefore may also take + *

Since {@code @Configuration} is meta-annotated with {@link Component @Component}, + * {@code @Configuration} classes are candidates for component scanning — + * for example, using {@link ComponentScan @ComponentScan} or Spring XML's + * {@code } element — and therefore may also take * advantage of {@link Autowired @Autowired}/{@link jakarta.inject.Inject @Inject} - * like any regular {@code @Component}. In particular, if a single constructor is present - * autowiring semantics will be applied transparently for that constructor: + * like any regular {@code @Component}. In particular, if a single constructor is + * present, autowiring semantics will be applied transparently for that constructor: * *

  * @Configuration