Horv
06/24/2019, 7:12 PMapplication.conf
variable1: value1
variable2: value2
application-dev.conf
variable3: value3
And be able to run the application with both application.conf
and application-dev.conf
applied. Or possibly 1 config file but evaluate different configs depending on environment variables. When reading up on HOCON
I couldn't find it it supports any kind of ternary operator or so.Ben
06/24/2019, 8:49 PMobobo
06/24/2019, 8:57 PM-Dconfig.file=application.conf
it will load in reference.conf
and then merge application.conf
onto it
And then you can instance your server like
val hoconConfig = ConfigFactory.load().resolve()
server = embeddedServer(YourEngine, applicationEngineEnvironment {
config = HoconApplicationConfig(hoconConfig)
}).start()