mixinafIocConfig::ConfigClass
afIocConfig::ConfigClass
@Js
A utility mixin that simply logs injected config on startup. Because sometimes it's nice to see what your app is using! Example:
using afIocConfig
const class AppConfig : ConfigClass {
@Config const Uri jdbcUrl
@Config const Str username
@Config const Str password
@Config const Str messageOfTheDay
new make(|This| f) { f(this) }
}
Will print:
App Config ========== Jdbc Url ......... : jdbc:wotever Username ......... : knobs Password ......... : secret Message Of The Day : Eat moar ice-cream!
- dump
static Str dump(Obj configClass, Str? title := null, [Str:Obj]? extra := null)Dumps
@Configfields of the givenconfigClassto aStr, appending any extra properties to the end.Any key starting with
---is used as a separator.Is
staticso it may be called from anywhere.- dumpFields
static Str dumpFields(Obj configClass, Field[] fields, Str? title := null, [Str:Obj]? extra := null)Dumps fields of the given
configClassto aStr, appending any extra properties to the end.Any key starting with
---is used as a separator.Is
staticso it may be called from anywhere.- logConfig
@PostInjection
virtual Void logConfig()Logs the
@Configfields toinfo.