data class MyConfig(
override val tegral: TegralConfig,
val hello: String,
val foo: FooConfig
) : RootConfig
data class FooConfig(val bar: String)
val app = tegral(enableDefaults = false) {
useConfiguration<MyConfig>()
useConfiguration {
addSource(TomlPropertySource("""
hello = "Hello!"
[foo]
bar = "Bar!"
""".trimIndent()))
}
put(::FoobarService)
}
Error loading config because:
- Could not instantiate 'guru.zoroark.tegral.web.appdsl.Issue39Repro.MyConfig' because:
- 'tegral': Missing from config
com.sksamuel.hoplite.ConfigException: Error loading config because:
- Could not instantiate 'guru.zoroark.tegral.web.appdsl.Issue39Repro.MyConfig' because:
- 'tegral': Missing from config
e.g.