|
|
|
@ -83,12 +83,13 @@ import org.springframework.stereotype.Component;
@@ -83,12 +83,13 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
* |
|
|
|
|
* <h3>Via component scanning</h3> |
|
|
|
|
* |
|
|
|
|
* <p>{@code @Configuration} is meta-annotated with {@link Component @Component}, therefore |
|
|
|
|
* {@code @Configuration} classes are candidates for component scanning (typically using |
|
|
|
|
* Spring XML's {@code <context:component-scan/>} element) and therefore may also take |
|
|
|
|
* <p>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 <context:component-scan/>} 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: |
|
|
|
|
* |
|
|
|
|
* <pre class="code"> |
|
|
|
|
* @Configuration |
|
|
|
|