Interface PriorityOrdered
- All Superinterfaces:
Ordered
- All Known Implementing Classes:
AutowiredAnnotationBeanPostProcessor,CommonAnnotationBeanPostProcessor,ConfigurationClassPostProcessor,ExposeInvocationInterceptor,InitDestroyAnnotationBeanPostProcessor,PersistenceAnnotationBeanPostProcessor,PlaceholderConfigurerSupport,PreferencesPlaceholderConfigurer,PropertyOverrideConfigurer,PropertyPlaceholderConfigurer,PropertyResourceConfigurer,PropertySourcesPlaceholderConfigurer,RequiredAnnotationBeanPostProcessor
public interface PriorityOrdered extends Ordered
Extension of theOrderedinterface, expressing a priority ordering:PriorityOrderedobjects are always applied before plainOrderedobjects regardless of their order values.When sorting a set of
Orderedobjects,PriorityOrderedobjects and plainOrderedobjects are effectively treated as two separate subsets, with the set ofPriorityOrderedobjects preceding the set of plainOrderedobjects 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:
PriorityOrderedpost-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.- Since:
- 2.5
- Author:
- Juergen Hoeller, Sam Brannen
- See Also:
PropertyOverrideConfigurer,PropertyPlaceholderConfigurer
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE