Problems with hot swap and grails 3.2.8

393 Views Asked by At

I am developing in grails 3.2.8 and the code hot swap simply does not work. I know that i should talk to spring boot, but perhaps someone had the tailored fix for grails. BTW, i had a quick look at the spring boot questions but could not find anything related to hot swap. Am I the only one with this problem?!

1

There are 1 best solutions below

0
On

Add the following to build.gradle:

import grails.util.Environment

bootRun {

    final Boolean reloadEnabled =
            Boolean.valueOf(
                    System.properties[Environment.RELOAD_ENABLED])

    if (reloadEnabled) {
        systemProperty Environment.RELOAD_ENABLED, reloadEnabled
    }

}

Then start the application with:

grails -Dgrails.env=custom -Dgrails.reload.enabled=true run-app

Credit to Hubert Klein Ikkink