Grails在自定义环境中的run-app中自动重新加载功能

Eri*_*ett 21 deployment grails environments

当通过grails -Dgrails.env = custom run-app运行带有grails的自定义环境时,似乎关闭了自动重新加载/热部署,是否有人知道如何在任何给定环境中任意启用此设置,而不仅仅是dev,是默认情况下它实际上唯一的环境?

ana*_*ocs 18

我通过将以下内容添加到我的env(在本例中为自定义)Config.groovy来解决这个问题:

    custom {

    disable.auto.recompile=false
    grails.gsp.enable.reload=true
}
Run Code Online (Sandbox Code Playgroud)

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

grails -reloading -Dgrails.env=custom  run-app
Run Code Online (Sandbox Code Playgroud)

确保它是第一个arg!

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

运行配置更改

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


Ted*_*eid 3

您想要的标志是“disable.auto.recompile”,例如:

grails -Dgrails.env=custom -Ddisable.auto.recompile=false run-app
Run Code Online (Sandbox Code Playgroud)