facet classafIocConfig::Config
sys::Obj 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.
- id
const Str? idThe id of the config value to be injected.
If
nullthen a matching strategy is utilised.- optional
const Bool? optionaloptionalmeans an Err is not thrown if the config cannot be found. Fields are not set if config could not be found. This letsoptionalfields take default values.@Config private Duration? timeToSelfDestruct := 10sec
If
nullthen it defaults totrueif the field is nullable.