facet classafIocConfig::Config

sys::Obj
  afIocConfig::Config : sys::Facet

@Js
@Serializable

Use to inject config values into your classes. Example:

@Config { id="gzipThreshold" }
private Int gzipThreshold

If id is not provided, it is matched against a combination of field name, class name, and pod name. See user guide for a complete description of the matching strategy.

id

Source

const Str? id

The id of the config value to be injected.

If null then a matching strategy is utilised.

optional

Source

const Bool? optional

optional means an Err is not thrown if the config cannot be found. Fields are not set if config could not be found. This lets optional fields take default values.

@Config
private Duration? timeToSelfDestruct := 10sec

If null then it defaults to true if the field is nullable.