Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
if (Environment.current == Environment.TEST)
我正在尝试将 Grails 2.4 升级到 3.3.6 并且无法更改环境:从开发到测试,有人可以帮助我吗?
您可以在启动应用程序时传递环境。
grails -Dgrails.env=TEST run-app
检查这个
我只复制和粘贴我的控制器和服务,因此默认情况下没有创建运行配置。我只是去 IntelliJ--Run--Edit configuration 并根据屏幕截图添加信息。在此处输入图像描述