Home > database >  Hot reload classes in Grails 5.x
Hot reload classes in Grails 5.x

Time:12-10

I have been working with Grails 3.x for a long time with IntelliJ. Projects often used spring security and other nice plugin. One nice feature is that if I change a java/groovy class then I see the ide compile and a deploy at runtime, without restart the entirely project. Moving to Grails 5.x I see that this happen again but it restarts the entirely application instead of hot reloading just the changed class. I don't know if this is something related to the IDE or the new springboot library that comes with the new grails version.

CodePudding user response:

I don't know if this is something related to the IDE or the new springboot library that comes with the new grails version.

It isn't related to the IDE, and isn't really directly related to the new Spring Boot library. The change has more to do with Spring Loaded changes and compatibility.

By default Grails 5 apps are configured with a dependency on org.springframework.boot:spring-boot-devtools which is responsible for monitoring changes to the source code and it restarts the app when certain changes are made.

If you want to configure Spring Loaded, JRebel, or some other hotswapping agent, that would have to be configured by you. None of that is configured in a default generated Grails 5 app.

  • Related