From a16afe8e1091299a33360d463c46092addc2e5a1 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 6 Oct 2022 16:42:17 +0200 Subject: [PATCH] Describe the replacement use case for BeanRegistrationAotProcessor Closes gh-29126 --- .../beans/factory/aot/BeanRegistrationAotProcessor.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationAotProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationAotProcessor.java index 9686529df3..7873199a26 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationAotProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanRegistrationAotProcessor.java @@ -22,7 +22,12 @@ import org.springframework.lang.Nullable; /** * AOT processor that makes bean registration contributions by processing - * {@link RegisteredBean} instances. + * {@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 BeanRegistrationAotProcessor} implementations may be registered in * a {@value AotServices#FACTORIES_RESOURCE_LOCATION} resource or as a bean. @@ -34,6 +39,7 @@ import org.springframework.lang.Nullable; * already initialized early in the bean factory lifecycle. * * @author Phillip Webb + * @author Stephane Nicoll * @since 6.0 * @see BeanRegistrationAotContribution */