A replay structure overriding the `application.conf` value based on the environment

Game 2.6.x Scala

I have a default application.confin the folder {project}/conf/, but I would like to override some values ​​depending on the environment, passing the corresponding file as command line arguments ( as described in detail in the documents ):

sbt run -Dconfig.file=/conf/qa.conf or sbt run -Dconfig.resource=qa.conf

But I can’t play to pick overrides. Here is my file directory:

application  
    |- playApp1
    |- playApp2  
       |-- conf  
           |-- application.conf 
           |-- qa.conf

My build.sbtmakes playApp2 the default project at boot time. And I confirmed that defulat works application.conf- just overriding is not.

Thanks for any ideas!

-

Update

HOCON files are used here. application.conf

platform {
  scheme = "http"
  host = "localhost:8080"
}

and overrides as indicated in qa.conf

include "application.conf"

platform {
  scheme = "https"
  host = "ea311.34.com"
}
0
2

,

sbt -Dconfig.resource=qa.conf run
+1

HOCON, .

application.conf, . akka.log-config-on-start, Java CONFIG_DUMP, :

akka { log-config-on-start = false log-config-on-start = ${?CONFIG_DUMP} }

HOCON .

+1

All Articles