https://kotlinlang.org logo
#ktor
Title
# ktor
c

crummy

04/07/2020, 1:34 AM
This is only ktor-adjacent, but I'm looking at ktor's application.conf setup and would like to re-use this functionality for my own configuration classes. I've discovered I can call
HoconApplicationConfig(ConfigFactory.load()).property("apiKey")
, but this gets cumbersome - is there a way to define a class (or data class) and have its values automatically instantiated from application.conf values?
looks like config4k does this, I assume ktor doesn't do it natively then?
2 Views