default

fun default(value: V): FieldConfigScope<V>

Sets the default value for the configuration field.

If the field is missing or null in the loaded configuration, this value will be used instead.

Example:

field(AppConfig::port).default(8080)

Return

this FieldConfigScope for method chaining

Parameters

value

the default value to be assigned to the field