Skip to content

Commit 6867051

Browse files
committed
Polish Javadoc for @⁠Import
1 parent af4fc01 commit 6867051

File tree

1 file changed

+11
-5
lines changed
  • spring-context/src/main/java/org/springframework/context/annotation

1 file changed

+11
-5
lines changed

spring-context/src/main/java/org/springframework/context/annotation/Import.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,23 @@
2929
* {@link Configuration @Configuration} classes.
3030
*
3131
* <p>Provides functionality equivalent to the {@code <import/>} element in Spring XML.
32-
* Allows for importing {@code @Configuration} classes, {@link ImportSelector} and
33-
* {@link ImportBeanDefinitionRegistrar} implementations, as well as regular component
34-
* classes (as of 4.2; analogous to {@link AnnotationConfigApplicationContext#register}).
32+
*
33+
* <p>Allows for importing {@code @Configuration} classes, {@link ImportSelector},
34+
* {@link ImportBeanDefinitionRegistrar}, and {@link BeanRegistrar} implementations,
35+
* as well as regular component classes (analogous to
36+
* {@link AnnotationConfigApplicationContext#register}).
3537
*
3638
* <p>{@code @Bean} definitions declared in imported {@code @Configuration} classes should be
3739
* accessed by using {@link org.springframework.beans.factory.annotation.Autowired @Autowired}
3840
* injection. Either the bean itself can be autowired, or the configuration class instance
3941
* declaring the bean can be autowired. The latter approach allows for explicit, IDE-friendly
4042
* navigation between {@code @Configuration} class methods.
4143
*
42-
* <p>May be declared at the class level or as a meta-annotation.
44+
* <p>May be declared directly at the class level or as a meta-annotation.
45+
* {@code @Import} annotations declared directly at the class level are processed
46+
* after {@code @Import} annotations declared as meta-annotations, which allows
47+
* directly declared imports to override beans registered via {@code @Import}
48+
* meta-annotations.
4349
*
4450
* <p>If XML or other non-{@code @Configuration} bean definition resources need to be
4551
* imported, use the {@link ImportResource @ImportResource} annotation instead.
@@ -59,7 +65,7 @@
5965

6066
/**
6167
* {@link Configuration @Configuration}, {@link ImportSelector},
62-
* {@link ImportBeanDefinitionRegistrar}, {@link BeanRegistrar} or regular
68+
* {@link ImportBeanDefinitionRegistrar}, {@link BeanRegistrar}, or regular
6369
* component classes to import.
6470
*/
6571
Class<?>[] value();

0 commit comments

Comments
 (0)