|
29 | 29 | * {@link Configuration @Configuration} classes.
|
30 | 30 | *
|
31 | 31 | * <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}). |
35 | 37 | *
|
36 | 38 | * <p>{@code @Bean} definitions declared in imported {@code @Configuration} classes should be
|
37 | 39 | * accessed by using {@link org.springframework.beans.factory.annotation.Autowired @Autowired}
|
38 | 40 | * injection. Either the bean itself can be autowired, or the configuration class instance
|
39 | 41 | * declaring the bean can be autowired. The latter approach allows for explicit, IDE-friendly
|
40 | 42 | * navigation between {@code @Configuration} class methods.
|
41 | 43 | *
|
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. |
43 | 49 | *
|
44 | 50 | * <p>If XML or other non-{@code @Configuration} bean definition resources need to be
|
45 | 51 | * imported, use the {@link ImportResource @ImportResource} annotation instead.
|
|
59 | 65 |
|
60 | 66 | /**
|
61 | 67 | * {@link Configuration @Configuration}, {@link ImportSelector},
|
62 |
| - * {@link ImportBeanDefinitionRegistrar}, {@link BeanRegistrar} or regular |
| 68 | + * {@link ImportBeanDefinitionRegistrar}, {@link BeanRegistrar}, or regular |
63 | 69 | * component classes to import.
|
64 | 70 | */
|
65 | 71 | Class<?>[] value();
|
|
0 commit comments