接口 PriorityOrdered
- 所有超级接口:
Ordered
- 所有已知实现类:
AutowiredAnnotationBeanPostProcessor
,CommonAnnotationBeanPostProcessor
,ConfigurationClassPostProcessor
,ExposeInvocationInterceptor
,InitDestroyAnnotationBeanPostProcessor
,PersistenceAnnotationBeanPostProcessor
,PlaceholderConfigurerSupport
,PreferencesPlaceholderConfigurer
,PropertyOverrideConfigurer
,PropertyPlaceholderConfigurer
,PropertyResourceConfigurer
,PropertySourcesPlaceholderConfigurer
,RequiredAnnotationBeanPostProcessor
public interface PriorityOrdered extends Ordered
Extension of theOrdered
interface, expressing a priority ordering:PriorityOrdered
objects are always applied before plainOrdered
objects regardless of their order values.When sorting a set of
Ordered
objects,PriorityOrdered
objects and plainOrdered
objects are effectively treated as two separate subsets, with the set ofPriorityOrdered
objects preceding the set of plainOrdered
objects and with relative ordering applied within those subsets.This is primarily a special-purpose interface, used within the framework itself for objects where it is particularly important to recognize prioritized objects first, potentially without even obtaining the remaining objects. A typical example: prioritized post-processors in a Spring
ApplicationContext
.Note:
PriorityOrdered
post-processor beans are initialized in a special phase, ahead of other post-processor beans. This subtly affects their autowiring behavior: they will only be autowired against beans which do not require eager initialization for type matching.- 从以下版本开始:
- 2.5
- 作者:
- Juergen Hoeller, Sam Brannen
- 另请参阅:
PropertyOverrideConfigurer
,PropertyPlaceholderConfigurer
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE