【发布时间】:2018-11-18 12:02:25
【问题描述】:
播放 2.6.x Scala
我在文件夹 {project}/conf/ 中有一个默认的 application.conf,但我想根据环境通过将相应文件作为命令行参数 (as detailed in the docs) 传递来覆盖一些值:
sbt run -Dconfig.file=/conf/qa.conf 或 sbt run -Dconfig.resource=qa.conf
但我无法获得覆盖。这是我的文件目录:
application
|- playApp1
|- playApp2
|-- conf
|-- application.conf
|-- qa.conf
我的build.sbt 使 playApp2 成为加载时的默认项目。而且我已经确认 defulat application.conf 正在工作 - 只是覆盖没有。
感谢您的任何想法!
--
更新
这里是播放使用的 HOCON 文件。 application.conf
platform {
scheme = "http"
host = "localhost:8080"
}
以及qa.conf中提供的覆盖
include "application.conf"
platform {
scheme = "https"
host = "ea311.34.com"
}
【问题讨论】:
-
请出示您的
application.conf
标签: scala playframework