Grails在自定义环境中的运行应用程序中自动重新加载功能 [英] Grails auto reload functionality in run-app on a custom environment

查看:131
本文介绍了Grails在自定义环境中的运行应用程序中自动重新加载功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过grails运行带有grails的自定义环境-Dgrails.env =自定义运行应用程序似乎自动重新加载/热部署已关闭,有没有人知道如何任意给任何给定的环境启用此功能,而不仅仅是dev ,这似乎是默认情况下唯一的实际上是env?

When running a custom environment with grails via grails -Dgrails.env=custom run-app it appears that the auto reload / hot deploy is turned off, does anyone know how to arbitrarily enable this for any given environment, not just dev, which appears to be the only env where it is actually on by default?

推荐答案

我通过将以下内容添加到我的解决方案env(在这种情况下定制)Config.groovy:

I resolved this by adding the following to my env(custom in this case) Config.groovy:

    custom {

    disable.auto.recompile=false
    grails.gsp.enable.reload=true
}

你还可以在运行配置中添加-reload标志:

You can also add the -reloading flag to your run config:

grails -reloading -Dgrails.env=custom  run-app

确保它是第一个参数!

右键单击您的项目 - >运行方式 - >运行配置

Right-click your project -> Run as -> Run configurations

关于Grails自定义env中自动刷新的博客文章

这篇关于Grails在自定义环境中的运行应用程序中自动重新加载功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆