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

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

问题描述

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

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
}

您还可以将 -reloading 标志添加到您的运行配置中:

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 中自动刷新的博文自定义环境

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

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