org.springframework.core.annotation

Annotation Type Order


  • @Retention(value=RUNTIME)
    @Target(value={TYPE,METHOD,FIELD})
    public @interface Order
    Annotation that defines ordering. The value is optional, and represents order value as defined in the Ordered interface. Lower values have higher priority. The default value is Ordered.LOWEST_PRECEDENCE, indicating lowest priority (losing to any other specified order value).

    NOTE: Annotation-based ordering is supported for specific kinds of components only, e.g. for annotation-based AspectJ aspects. Spring container strategies, on the other hand, are typically based on the Ordered interface in order to allow for configurable ordering of each instance.

    Since:
    2.0
    Author:
    Rod Johnson, Juergen Hoeller
    See Also:
    Ordered, AnnotationAwareOrderComparator
    • Optional Element Summary

      Optional Elements  
      Modifier and Type Optional Element and Description
      int value
      The order value.