|
|
|
@ -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 |
|
|
|
|