Clarify the scope of AotContributingBeanPostProcessor
This commit updates AotContributingBeanPostProcessor so that it explicitly extends from PriorityOrdered. This makes it more apparent that AOT contributing bean post processors are meant to be invoked early with the regular runtime, and shouldn't be post-processed themselves. See gh-28047
This commit is contained in:
parent
20b17f02a2
commit
ea19b92deb
|
@ -18,12 +18,13 @@ package org.springframework.beans.factory.generator;
|
|||
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.core.PriorityOrdered;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* Specialization of {@link BeanPostProcessor} that contributes to bean
|
||||
* instantiation ahead of time, providing generated code that is equivalent to
|
||||
* its runtime behavior.
|
||||
* Specialization of a priority ordered {@link BeanPostProcessor} that
|
||||
* contributes to bean instantiation ahead of time, providing generated code
|
||||
* that is equivalent to its runtime behavior.
|
||||
*
|
||||
* <p>Contrary to other bean post processors, implementations of this interface
|
||||
* are instantiated at build-time and should not rely on other beans in the
|
||||
|
@ -32,8 +33,7 @@ import org.springframework.lang.Nullable;
|
|||
* @author Stephane Nicoll
|
||||
* @since 6.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface AotContributingBeanPostProcessor extends BeanPostProcessor {
|
||||
public interface AotContributingBeanPostProcessor extends BeanPostProcessor, PriorityOrdered {
|
||||
|
||||
/**
|
||||
* Contribute a {@link BeanInstantiationContribution} for the given bean definition,
|
||||
|
|
Loading…
Reference in New Issue