3

Is there any way to change current environment from DEVELOPMENT to TEST?

I have tried,

if(Environment.getCurrent().equals(Environment.DEVELOPMENT)){
    Environment.currentEnvironment = Environment.TEST
    println("Current Environment : "+Environment.getCurrent())
}

But it is showing error like :

Error There was an error loading the BuildConfig: Cannot set readonly property: currentEnvironment for class: grails.util.Environment

How can I change this ENVIRONMENT property?

I need to change my development environment into TEST for some AES encryption algorithms, as it is not working in Development environment.

Now am using grails test run-app command for running app in test environment, How can I fix it in TEST environment permanently?

JiniKJohny
  • 1,172
  • 13
  • 29
  • 1
    You could set an environment variable with the name of `grails.env` to the value of `test`. However, this would apply to all Grails applications on that machine/computer. The real solution would be to address whatever issue you are having with your AES encryption that prevents it from working correctly in your development environment. – Joshua Moore Sep 30 '14 at 11:02

0 Answers0