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.
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
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
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.