Browse Source

Polish Javadoc for @⁠Import

pull/34989/head
Sam Brannen 8 months ago
parent
commit
686705140e
  1. 16
      spring-context/src/main/java/org/springframework/context/annotation/Import.java

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

@ -29,9 +29,11 @@ import org.springframework.beans.factory.BeanRegistrar; @@ -29,9 +29,11 @@ import org.springframework.beans.factory.BeanRegistrar;
* {@link Configuration @Configuration} classes.
*
* <p>Provides functionality equivalent to the {@code <import/>} element in Spring XML.
* Allows for importing {@code @Configuration} classes, {@link ImportSelector} and
* {@link ImportBeanDefinitionRegistrar} implementations, as well as regular component
* classes (as of 4.2; analogous to {@link AnnotationConfigApplicationContext#register}).
*
* <p>Allows for importing {@code @Configuration} classes, {@link ImportSelector},
* {@link ImportBeanDefinitionRegistrar}, and {@link BeanRegistrar} implementations,
* as well as regular component classes (analogous to
* {@link AnnotationConfigApplicationContext#register}).
*
* <p>{@code @Bean} definitions declared in imported {@code @Configuration} classes should be
* accessed by using {@link org.springframework.beans.factory.annotation.Autowired @Autowired}
@ -39,7 +41,11 @@ import org.springframework.beans.factory.BeanRegistrar; @@ -39,7 +41,11 @@ import org.springframework.beans.factory.BeanRegistrar;
* declaring the bean can be autowired. The latter approach allows for explicit, IDE-friendly
* navigation between {@code @Configuration} class methods.
*
* <p>May be declared at the class level or as a meta-annotation.
* <p>May be declared directly at the class level or as a meta-annotation.
* {@code @Import} annotations declared directly at the class level are processed
* after {@code @Import} annotations declared as meta-annotations, which allows
* directly declared imports to override beans registered via {@code @Import}
* meta-annotations.
*
* <p>If XML or other non-{@code @Configuration} bean definition resources need to be
* imported, use the {@link ImportResource @ImportResource} annotation instead.
@ -59,7 +65,7 @@ public @interface Import { @@ -59,7 +65,7 @@ public @interface Import {
/**
* {@link Configuration @Configuration}, {@link ImportSelector},
* {@link ImportBeanDefinitionRegistrar}, {@link BeanRegistrar} or regular
* {@link ImportBeanDefinitionRegistrar}, {@link BeanRegistrar}, or regular
* component classes to import.
*/
Class<?>[] value();

Loading…
Cancel
Save