Reputation: 1746
How to let playframework's configuration falls back to other configuration files if a default one is not exist.
For example, by default play use application.conf, if it does not exist, use c1.conf. if c1.conf does not exist, uses c2.conf.
I use play framework 2.3 in scala
Thanks.
Upvotes: 1
Views: 174
Reputation: 14401
Such a feature doesn't exist in the Play framework. All you can do is to specify which file should be used as the configuration by passing one of the possible properties to your startup script.
Available parameters are described in the documentation under the section called Specifying alternative configuration file
.
If none of this properties is passed to the application, it'll use application.conf as a default one.
To complete your task, you can write a bash script which will verify whether the script that you want to run exists. If so, pass it using one of aforementioned parameters or use a different one otherwise.
Upvotes: 3