At the time bootstrap.groovy is running GrailsUtil.environment is automatically switch to development.
Can any one explain,How can i manually change that variable before bootstrap starts..??
Where it is setting as default to development in grails framework..??
Thanks.
Your grails environment is specified on the command line when you type run-app
, for example. I don't believe you can switch the environment setting within Bootstrap.groovy--or any file--at runtime. Instead, you can change it by how you execute the grails commands:
-Dgrails.env=production run-app
-- you can create your own environments to run, just change the value for -Dgrails.env
to your custom environment.
Some of the grails tasks will run in a given environment by default; you don't need to set it explicitly.
run-app
-- defaults to run in the development
environmenttest-app
-- defaults to test
environmentwar
-- defaults to production
environmentMore info here: http://www.grails.org/Environments
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With