facet classafIocConfig::Config

  afIocConfig::Config : sys::Facet


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.



const Str? id

The id of the config value to be injected.

If null then a matching strategy is utilised.



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.

private Duration? timeToSelfDestruct := 10sec

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