facet classafIocConfig::Config

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

@Serializable

Use to inject config values into your classes. Example:

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

If id is not provided, it takes on the name of the field. Therefore the following is identical to the above:

@Config
private Int gzipThreshold
id

Source

const Str? id := null

The id of the config value to be injected.

optional

Source

const Bool optional := false

If true and the config id cannot be found then null is returned and an Err is not thrown.

Just ensure the field is nullable!