Annotation Interface ConfigRoot


@Retention(RUNTIME) @Target(TYPE) @Documented public @interface ConfigRoot
A marker used in conjunction with ConfigMapping by Quarkus Extensions to set the Quarkus ConfigPhase of the mapping. The ConfigMapping.prefix() must state the full path of the configuration namespace.

A Configuration Root is strictly bound by the configuration phase, and attempting to access a Configuration Root from outside its corresponding phase will result in an error. They dictate when its contained keys are read from the configuration, and when they are available to applications.

A Configuration Root works exactly as a ConfigMapping. It can be retrieved programmatically via SmallRyeConfig.getConfigMapping(Class) and injected via CDI. Additionally, Quarkus will automatically inject a Configuration Root in the following cases:

All members of a Configuration root must be documented with a Javadoc.

This annotation can only be used on interfaces.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Determine the phase of this configuration root.
  • Element Details

    • phase

      Determine the phase of this configuration root.
      Returns:
      the phase
      Default:
      BUILD_TIME