Browse Source

Polish

pull/29282/head
Stephane Nicoll 2 years ago
parent
commit
c74760540d
  1. 16
      spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanFactoryInitializationAotProcessor.java
  2. 27
      spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationAotProcessor.java

16
spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanFactoryInitializationAotProcessor.java

@ -24,15 +24,19 @@ import org.springframework.lang.Nullable; @@ -24,15 +24,19 @@ import org.springframework.lang.Nullable;
* AOT processor that makes bean factory initialization contributions by
* processing {@link ConfigurableListableBeanFactory} instances.
*
* <p>{@link BeanFactoryInitializationAotProcessor} implementations may be
* <p>{@code BeanFactoryInitializationAotProcessor} implementations may be
* registered in a {@value AotServices#FACTORIES_RESOURCE_LOCATION} resource or
* as a bean.
*
* <p>Note: Using this interface on a registered bean will cause the bean
* <em>and</em> all of its dependencies to be initialized during AOT processing.
* We generally recommend that this interface is only used with infrastructure
* beans such as {@link BeanFactoryPostProcessor} which have limited dependencies
* and are already initialized early in the bean factory lifecycle.
* <p>Using this interface on a registered bean will cause the bean <em>and</em>
* all of its dependencies to be initialized during AOT processing. We generally
* recommend that this interface is only used with infrastructure beans such as
* {@link BeanFactoryPostProcessor} which have limited dependencies and are
* already initialized early in the bean factory lifecycle. If such a bean is
* registered using a factory method, make sure to make it {@code static} so
* that its enclosing class does not have to be initialized.
*
* <p>A component that implements this interface is not contributed.
*
* @author Phillip Webb
* @author Stephane Nicoll

27
spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationAotProcessor.java

@ -22,21 +22,24 @@ import org.springframework.lang.Nullable; @@ -22,21 +22,24 @@ import org.springframework.lang.Nullable;
/**
* AOT processor that makes bean registration contributions by processing
* {@link RegisteredBean} instances. An AOT processor replaces its usual
* runtime behavior by an optimized arrangement, usually in generated
* code. For that reason, a component that implements this interface is
* not contributed by default. If a component that implements this
* interface still needs to be invoked at runtime,
* {@link #isBeanExcludedFromAotProcessing} can be overridden.
* {@link RegisteredBean} instances.
*
* <p>{@link BeanRegistrationAotProcessor} implementations may be registered in
* <p>{@code BeanRegistrationAotProcessor} implementations may be registered in
* a {@value AotServices#FACTORIES_RESOURCE_LOCATION} resource or as a bean.
*
* <p>Note: Using this interface on a registered bean will cause the bean
* <em>and</em> all of its dependencies to be initialized during AOT processing.
* We generally recommend that interface is only used with infrastructure beans
* such as {@link BeanPostProcessor} which have limited dependencies and are
* already initialized early in the bean factory lifecycle.
* <p>Using this interface on a registered bean will cause the bean <em>and</em>
* all of its dependencies to be initialized during AOT processing. We generally
* recommend that this interface is only used with infrastructure beans such as
* {@link BeanPostProcessor} which have limited dependencies and are already
* initialized early in the bean factory lifecycle. If such a bean is registered
* using a factory method, make sure to make it {@code static} so that its
* enclosing class does not have to be initialized.
*
* <p>An AOT processor replaces its usual runtime behavior by an optimized
* arrangement, usually in generated code. For that reason, a component that
* implements this interface is not contributed by default. If a component that
* implements this interface still needs to be invoked at runtime,
* {@link #isBeanExcludedFromAotProcessing} can be overridden.
*
* @author Phillip Webb
* @author Stephane Nicoll

Loading…
Cancel
Save