Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Play! module to allow you to load an external properties file. Useful when deploying as a war for instance.
Java Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
conf
documentation/manual
lib
sample/externalconfigsample
.gitignore
LICENSE
README.textile
build.xml
commands.py
fresh.sh

README.textile

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.

Something went wrong with that request. Please try again.