Top Description Fields Methods
org.springframework.core

public Interface PriorityOrdered

extends Ordered

Extension of the Ordered interface, expressing a priority ordering: PriorityOrdered objects are always applied before plain Ordered objects regardless of their order values.

When sorting a set of Ordered objects, PriorityOrdered objects and plain Ordered objects are effectively treated as two separate subsets, with the set of PriorityOrdered objects preceding the set of plain Ordered 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 org.springframework.context.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.

Authors
Juergen Hoeller, Sam Brannen
Since
2.5
See Also
org.springframework.beans.factory.config.PropertyOverrideConfigurer

Field Summary

Inherited from org.springframework.core.Ordered:
HIGHEST_PRECEDENCELOWEST_PRECEDENCE

Method Summary

Inherited from org.springframework.core.Ordered:
getOrder