[英]Grails auto reload functionality in run-app on a custom environment
当通过grails -Dgrails.env = custom run-app运行带有grails的自定义环境时,似乎关闭了自动重新加载/热部署,是否有人知道如何为任何给定环境任意启用它,而不仅仅是dev,是默认情况下它实际上唯一的环境?
I resolved this by adding the following to my env(custom in this case) Config.groovy: 我通过将以下内容添加到我的env(在本例中为自定义)Config.groovy来解决这个问题:
custom {
disable.auto.recompile=false
grails.gsp.enable.reload=true
}
You can also add the -reloading flag to your run config: 您还可以将-reloading标志添加到运行配置中:
grails -reloading -Dgrails.env=custom run-app
Make sure it is the first arg! 确保它是第一个arg!
Right-click your project -> Run as -> Run configurations 右键单击项目 - >运行方式 - >运行配置
Blog post about auto refresh in a Grails custom env 关于Grails自定义环境中自动刷新的博客文章
你想要的标志是“disable.auto.recompile”,例如:
grails -Dgrails.env=custom -Ddisable.auto.recompile=false run-app
使用包含项目的文件夹的名称更改解决问题...这次是一个有空格的名称......因为相当大的空间一切都开始运作良好
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.