Skip to content

Commit ea19b92

Browse files
committed
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
1 parent 20b17f0 commit ea19b92

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/generator/AotContributingBeanPostProcessor.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818

1919
import org.springframework.beans.factory.config.BeanPostProcessor;
2020
import org.springframework.beans.factory.support.RootBeanDefinition;
21+
import org.springframework.core.PriorityOrdered;
2122
import org.springframework.lang.Nullable;
2223

2324
/**
24-
* Specialization of {@link BeanPostProcessor} that contributes to bean
25-
* instantiation ahead of time, providing generated code that is equivalent to
26-
* its runtime behavior.
25+
* Specialization of a priority ordered {@link BeanPostProcessor} that
26+
* contributes to bean instantiation ahead of time, providing generated code
27+
* that is equivalent to its runtime behavior.
2728
*
2829
* <p>Contrary to other bean post processors, implementations of this interface
2930
* are instantiated at build-time and should not rely on other beans in the
@@ -32,8 +33,7 @@
3233
* @author Stephane Nicoll
3334
* @since 6.0
3435
*/
35-
@FunctionalInterface
36-
public interface AotContributingBeanPostProcessor extends BeanPostProcessor {
36+
public interface AotContributingBeanPostProcessor extends BeanPostProcessor, PriorityOrdered {
3737

3838
/**
3939
* Contribute a {@link BeanInstantiationContribution} for the given bean definition,

0 commit comments

Comments
 (0)