Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails 4 hot swap / recompile

Im using: Intellij grailsVersion: 4.0.3 gorm.version: 7.0.4.RELEASE

I just get: Testcontroller.groovy changed, recompiling...

But my code isn't hot deployed. With Grails 3 everything worked fine.

What can I do so that the Controllers in Grails 4 and Spring Boot 2 get hot deployed?

like image 804
Lastone Avatar asked Oct 23 '25 14:10

Lastone


1 Answers

You may use spring-loaded (project has been idle for years but still works) or JRebel for "hot" reloads.

To enable:

build.gradle

dependencies {
    // Remove dev-tools from classpath
    // developmentOnly("org.springframework.boot:spring-boot-devtools") 
    agent "org.springframework:springloaded:1.2.8.RELEASE"
    // (Optional) Native OSX file watcher
    runtimeOnly "io.methvin:directory-watcher:0.9.6"
    //...
}

See: https://github.com/grails/grails-core/pull/11441

like image 159
erichelgeson Avatar answered Oct 26 '25 03:10

erichelgeson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!