Skip to content

Instantly share code, notes, and snippets.

@ianibo
Created March 17, 2018 19:18
Show Gist options
  • Save ianibo/418c0d2b4c4898356eb9866eae6b1d97 to your computer and use it in GitHub Desktop.
Save ianibo/418c0d2b4c4898356eb9866eae6b1d97 to your computer and use it in GitHub Desktop.
application.yaml
param1: This is param1
BootStrap.groovy
def init = { servletContext ->
log.debug("test value:\"${grailsApplication.config.param1}\"");
}
When run normally, this will output "This is param1" but after building the war, running
java -jar ./build/lib/MyWar.war --param1="Alternate Value"
will override the config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment