我想为不同的环境定义单独的设置:
env {
qa {
fass_url = "https://..."
client_id = "1111"
}
uat {
fass_url = "https://www...."
client_id = "2222"
}
}
如何为不同的环境加载这些设置?以下代码不起作用:
private[this] val config = ConfigFactory.load()
val env_sett = "qa"
val env = if (env_sett == "qa") "env_qa"
else if (env_sett == "uat") "env_uat"
else "env_test_uat"