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

后端 未结 3 1544
旧时难觅i
旧时难觅i 2020-12-16 12:18

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 arbi

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 13:02

    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

    Run Config changes

    Blog post about auto refresh in a Grails custom env

提交回复
热议问题