Reputation: 14218
I need to move some properties out of application.conf and into another config file, say secure-application.conf. Is there any way I can have properties loaded from two files?
Upvotes: 1
Views: 577
Reputation: 452
Actually, you can in Play 1.x! Just add this line to your application.conf
@include.override=secure-application.conf
Make sure the additional .conf file is also in the /conf folder.
If you are interested, you can check the relevant function in the Play.java file here https://github.com/playframework/play/blob/master/framework/src/play/Play.java#L430
Upvotes: 1
Reputation: 16439
If you are using Play 1.x, as your tags suggest, then the answer is that you cannot as far as I know. The only alternative is to set up the configuration file for several environments as per documentation.
If you use Play 2.x then you can, using the include
keyword to import a conf file into another
Upvotes: 1