Package io.quarkus.runtime.annotations
Annotation 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:
- Methods annotated with
@BuildStepand phaseConfigPhase.BUILD_TIMEorConfigPhase.BUILD_AND_RUN_TIME_FIXED - Recorder constructors and phase
ConfigPhase.BUILD_AND_RUN_TIME_FIXED - Recorder constructors and phase
ConfigPhase.RUN_TIMEif wrapped in aRuntimeValue
All members of a Configuration root must be documented with a Javadoc.
This annotation can only be used on interfaces.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDetermine the phase of this configuration root.
-
Element Details
-
phase
ConfigPhase phaseDetermine the phase of this configuration root.- Returns:
- the phase
- Default:
BUILD_TIME
-