Grails auto reload functionality in run-app on a custom environment

烂漫一生 提交于 2019-12-18 03:51:42

问题


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?


回答1:


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
}

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

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

Make sure it is the first arg!

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

Blog post about auto refresh in a Grails custom env




回答2:


The flag you want is "disable.auto.recompile", ex:

grails -Dgrails.env=custom -Ddisable.auto.recompile=false run-app



回答3:


solve the problem with the name change of my folder containing the project ... this time a name that had spaces ... since quite the spaces everything started to work well



来源:https://stackoverflow.com/questions/1325734/grails-auto-reload-functionality-in-run-app-on-a-custom-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!