Skip to content

Play! module to allow you to load an external properties file. Useful when deploying as a war for instance.

License

Notifications You must be signed in to change notification settings

beastawakens/externalconfig

Repository files navigation

externalconfig

externalconfig is a simple plugin which allows you to load a properties/config file from anywhere on the classpath.

This means that when deploying your application as a war file inside Tomcat or other application server, you can override config values from outside the war for your Production environments etc.

externalconfig was originally conceived and coded by Dan Griffin, who gave gracious permission to release it as a module to help others. I’ve amended and extended it slightly, but all credit should go to Dan.

Getting started

By default, the plugin will try and load a file with the same name as your application id (e.g. ‘test’, ‘prod’, etc) with the ‘.properties’ suffix.
If you would like to load a different file, then you can specify a filename in your application.conf with the following property:

externalConfig.fileName=/external.config 

Configuration

externalConfig.fileName

Specify the name of the extra config file you want to load. If you want to load multiple files, seperate them with a comma. e.g.

externalConfig.fileName=/one.config,/two.config,/three.config

Usage

Include the plugin as a dependency in your application. Make sure your external config file is present (even if empty). For dev/testing purposes, you can keep this file in your conf folder alongside the other config files.

About

Play! module to allow you to load an external properties file. Useful when deploying as a war for instance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published