if (Environment.current == Environment.TEST)
我正在尝试将Grails 2.4升级到3.3.6,但无法更改环境:从开发到测试,有人可以帮助我吗?
You can pass the environment when your start the application.
grails -Dgrails.env=TEST run-app
Check this
I was doing only copy and paste my controllers and services so there is no run configuration was created by default. I just go to IntelliJ--Run--Edit configuration and added the information as per the screenshot. enter image description here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.