Annotation Interface PreferredConfig


@Documented @Retention(RUNTIME) @Target({TYPE,FIELD,PARAMETER}) @API(status=STABLE, since="1.0") public @interface PreferredConfig
Sets the preferred Config subtype(s). Usable both for Configurable classes and for Spring injection points.
Since:
0.1
Version:
1.0, 2025-11
Author:
(w) Iker Hernaez
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Sets if the default configuration should be used if one of the preferred ones is not found.
    Class<? extends Config>[]
    Sets the preferred configuration classes.
  • Element Details

    • value

      Class<? extends Config>[] value
      Sets the preferred configuration classes.
      Returns:
      The preferred configuration classes.
      Default:
      {}
    • fallbackToDefaultConfig

      boolean fallbackToDefaultConfig
      Sets if the default configuration should be used if one of the preferred ones is not found.
      Returns:
      true if the default configuration should be used.
      Default:
      true