Annotation Interface ConfigValue


@Target(FIELD) @Retention(RUNTIME) @Documented public @interface ConfigValue
Marks a field as a configuration value. The field will be automatically populated from the config file.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether this value is required.
    Path to the value in the configuration file.
  • Element Details

    • value

      String value
      Path to the value in the configuration file. Supports dot notation for nested values (e.g., "database.host"). If empty, uses the field name.
      Returns:
      the configuration path
      Default:
      ""
    • required

      boolean required
      Whether this value is required.
      Returns:
      true if required, false otherwise
      Default:
      false