Your grails environment is indicated on the command line when entering run-app , for example. I do not believe that you can switch the environment setting in Bootstrap.groovy - or any file - at runtime. Instead, you can change it by running grails commands:
-Dgrails.env=production run-app - you can create your own startup environments, just change the value for -Dgrails.env to your custom environment.
Some grails tasks will run by default in a given environment; you do not need to explicitly specify it.
run-app - runs in development environment by defaulttest-app - default test environmentwar - default production environment
More information here: http://www.grails.org/Environments
source share