Skip to content

Instantly share code, notes, and snippets.

@crizCraig
Created February 5, 2013 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crizCraig/4712567 to your computer and use it in GitHub Desktop.
Save crizCraig/4712567 to your computer and use it in GitHub Desktop.
# Load the system properties
system=[method://java.lang.System.getProperties()]
# Define the environment and language based on the system properties,
# with sensible defaults.
# (these likely came in as -D options on the command line)
lang=${system->lang|english}
env=${system->env|dev}
# Include language based properties
languages={
english=[english.properties]
spanish=[spanish.properties]
}
# Include environment specific properties
environments={
dev=[development.properties]
test=[test.properties]
prod=[prod.properties]
}
current.lang=${languages->${lang}}
current.env=${environment->${env}}
hello.world="${current.lang->hello} ${current.lang->world}"
# Allow for possible local overrides
[/etc/local.properties|failonerror=false]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment