Annotation Interface Order


@Retention(RUNTIME) @Target({TYPE,METHOD,FIELD}) @Documented public @interface Order
Annotation for objects that are ordered.

Order in a Micronaut application is important in multiple aspects including but note limited to:

  • Controlling bean selection and prioritization
  • Ordering injected List collections.
  • Ordering AOP method interceptors
  • Ordering HTTP filters

This annotation can be used to control the order by specifying a numerical value that sorts components in the desired order

Since:
2.0
Author:
Sean Carroll
See Also:
  • Optional Element Summary

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

    • value

      int value
      The order value. Defaults to zero (no order).
      Returns:
      the order
      Default:
      0