grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

Known Hotswap Agent 2.0.2 Reloading Limitations with Grails 7+

Open jamesfredley opened this issue 4 months ago • 2 comments

Issue description

Changes to configure Hotswap Agent in an existing application, including automating the download and use on hotswap-agent.jar and gragent.jar: https://github.com/jamesfredley/hotswap-demo/commit/fb8386c50f7aad6aee1cefdbc37cc1571ad7d747

https://github.com/HotswapProjects/HotswapAgent/issues/581 - lacks Spring Boot 3.x.x and Spring Framework 6.x.x support, although it still works to some extent

Produces a lot of error logs, while still mostly working

Reloads automatically:

  • adding a controller for an existing domain
  • editing a controller
  • editing an existing service

Does not work without a restart:

  • new domain class
  • editing domain classes
  • editing a service
  • grails generate-all, due to order files are generated

jamesfredley avatar Aug 13 '25 17:08 jamesfredley

Link to this issue added in documentation: https://github.com/apache/grails-core/pull/14969 & https://grails.apache.org/docs/snapshot/guide/gettingStarted.html#developmentReloading

jamesfredley avatar Aug 13 '25 19:08 jamesfredley

Note: we'll likely want to configure Grails 7 similar to how we used to configure Springloaded. https://github.com/apache/grails-core/pull/15096 removes spring loaded, but most of the example configuration provided by @jamesfredley will need the same changes as spring loaded

jdaugherty avatar Sep 24 '25 17:09 jdaugherty