【发布时间】:2017-12-18 12:38:17
【问题描述】:
我在 application.conf 中有以下内容,并试图找出定义我的类以加载配置的最佳方法:
allKeys {
mysql {
dev {
host = <host1>
user = <user1>
}
prod {
host = <host1>
user = <user1>
}
hdfs {
endpoint = <host1>
port = <port1>
}
}
my case classes:
case class Settings(mysql: DbSettings, hdfs: HdfsSettings)
case class DbSettings(host: String, user: String)
case class HdfsSettings(endpoint: String, port: String)
我不知道如何正确加载它,以便它在 hdfs 中查找类似键时不会失败。
【问题讨论】:
标签: scala pureconfig