From 351fda50b977b7a3f63c5783f6fa92f37b940d8c Mon Sep 17 00:00:00 2001 From: James Fredley Date: Sat, 13 Dec 2025 00:11:12 -0500 Subject: [PATCH 1/5] Add IntelliJ IDEA Enhanced HotSwap to reloading guide Updated the development reloading documentation to include IntelliJ IDEA Enhanced HotSwap in Debug Mode as a supported tool for hot code reloading in Grails. Added details about its mechanism, usage, and relevant documentation links, as well as a note on overcoming limitations with JetBrains Runtime. --- .../guide/gettingStarted/developmentReloading.adoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc index 88d0ee879d3..8fcb3ac47db 100644 --- a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc +++ b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc @@ -17,7 +17,7 @@ specific language governing permissions and limitations under the License. //// -Spring Boot Developer Tools, JRebel, and Hotswap Agent are tools designed to improve developer productivity by enabling application reloading during development, reducing the need for full application restarts. Since Grails is built on Spring Boot, all three tools are compatible, but they differ in mechanisms, features, and trade-offs. Spring Boot Developer Tools is the default in Grails, replacing older agents like Spring Loaded (no longer maintained and lacking support for Java 17+). Hotswap Agent and JRebel offer more advanced "true" hot swapping capabilities. +Spring Boot Developer Tools, JRebel, IntelliJ IDEA Enhanced HotSwap in Debug Mode and Hotswap Agent are tools designed to improve developer productivity by enabling application reloading during development, reducing the need for full application restarts. Since Grails is built on Spring Boot, all three tools are compatible, but they differ in mechanisms, features, and trade-offs. Spring Boot Developer Tools is the default in Grails, replacing older agents like Spring Loaded (no longer maintained and lacking support for Java 17+). Hotswap Agent and JRebel offer more advanced "true" hot swapping capabilities. === Spring Boot Developer Tools @@ -38,8 +38,19 @@ JRebel is a commercial tool that provides advanced hot swapping capabilities, al Please see the JRebel documentation for more details: https://manuals.jrebel.com/jrebel/standalone/springboot.html[JRebel]. +JRebel plugin for IntelliJ IDEA: https://plugins.jetbrains.com/plugin/4441-jrebel-and-xrebel[JRebel IntelliJ Plugin]. + *Reloading Mechanism:* True hot swapping via bytecode instrumentation; reloads classes, configurations, and resources without restarting the JVM, preserving application state. +=== IntelliJ IDEA Enhanced HotSwap in Debug Mode +IntelliJ IDEA Enhanced HotSwap is a feature available in the IntelliJ IDEA IDE that allows developers to reload code changes while debugging their applications. When running a Grails application in debug mode, IntelliJ IDEA can reload modified classes without requiring a full application restart. This feature is particularly useful for making quick changes and testing them during a debugging session. + +*Reloading Mechanism:* Enhanced hot swapping using IntelliJ's debugging capabilities; reloads modified classes during a debug session, with limitations on structural changes. + +Please see the IntelliJ IDEA documentation for more details: https://www.jetbrains.com/help/idea/altering-the-program-s-execution-flow.html#reload_classes[IntelliJ IDEA Enhanced HotSwap]. + +Using https://github.com/JetBrains/JetBrainsRuntime[Jetbrains' Runtime] and jvmArgs `-XX:+AllowEnhancedClassRedefinition` on the `bootRun` task overcomes some of these limitations. + === Hotswap Agent *Hotswap Agent support for Grails is considered experimental, and it may not work in all cases. Known limitations are documented https://github.com/apache/grails-core/issues/14967[here].* From 4c9e27ab8c1f234a10109460e0388c118fe68910 Mon Sep 17 00:00:00 2001 From: James Fredley Date: Sat, 13 Dec 2025 00:21:30 -0500 Subject: [PATCH 2/5] Update grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/en/guide/gettingStarted/developmentReloading.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc index 8fcb3ac47db..4b8dac2c18a 100644 --- a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc +++ b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc @@ -17,7 +17,7 @@ specific language governing permissions and limitations under the License. //// -Spring Boot Developer Tools, JRebel, IntelliJ IDEA Enhanced HotSwap in Debug Mode and Hotswap Agent are tools designed to improve developer productivity by enabling application reloading during development, reducing the need for full application restarts. Since Grails is built on Spring Boot, all three tools are compatible, but they differ in mechanisms, features, and trade-offs. Spring Boot Developer Tools is the default in Grails, replacing older agents like Spring Loaded (no longer maintained and lacking support for Java 17+). Hotswap Agent and JRebel offer more advanced "true" hot swapping capabilities. +Spring Boot Developer Tools, JRebel, IntelliJ IDEA Enhanced HotSwap in Debug Mode and Hotswap Agent are tools designed to improve developer productivity by enabling application reloading during development, reducing the need for full application restarts. Since Grails is built on Spring Boot, all four tools are compatible, but they differ in mechanisms, features, and trade-offs. Spring Boot Developer Tools is the default in Grails, replacing older agents like Spring Loaded (no longer maintained and lacking support for Java 17+). Hotswap Agent and JRebel offer more advanced "true" hot swapping capabilities. === Spring Boot Developer Tools From 6ff705f7a36fb472407f886a3d2ee78495d37567 Mon Sep 17 00:00:00 2001 From: James Fredley Date: Sat, 13 Dec 2025 00:22:27 -0500 Subject: [PATCH 3/5] Update grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/en/guide/gettingStarted/developmentReloading.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc index 4b8dac2c18a..687f382ad42 100644 --- a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc +++ b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc @@ -49,7 +49,7 @@ IntelliJ IDEA Enhanced HotSwap is a feature available in the IntelliJ IDEA IDE t Please see the IntelliJ IDEA documentation for more details: https://www.jetbrains.com/help/idea/altering-the-program-s-execution-flow.html#reload_classes[IntelliJ IDEA Enhanced HotSwap]. -Using https://github.com/JetBrains/JetBrainsRuntime[Jetbrains' Runtime] and jvmArgs `-XX:+AllowEnhancedClassRedefinition` on the `bootRun` task overcomes some of these limitations. +Using https://github.com/JetBrains/JetBrainsRuntime[JetBrains' Runtime] and jvmArgs `-XX:+AllowEnhancedClassRedefinition` on the `bootRun` task overcomes some of these limitations. === Hotswap Agent From 48967769ee60aa234738e50cff3ec0916a09c67b Mon Sep 17 00:00:00 2001 From: James Fredley Date: Mon, 15 Dec 2025 13:41:04 -0500 Subject: [PATCH 4/5] Add Oxford Comma --- .../src/en/guide/gettingStarted/developmentReloading.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc index 687f382ad42..b42754eb987 100644 --- a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc +++ b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc @@ -17,7 +17,7 @@ specific language governing permissions and limitations under the License. //// -Spring Boot Developer Tools, JRebel, IntelliJ IDEA Enhanced HotSwap in Debug Mode and Hotswap Agent are tools designed to improve developer productivity by enabling application reloading during development, reducing the need for full application restarts. Since Grails is built on Spring Boot, all four tools are compatible, but they differ in mechanisms, features, and trade-offs. Spring Boot Developer Tools is the default in Grails, replacing older agents like Spring Loaded (no longer maintained and lacking support for Java 17+). Hotswap Agent and JRebel offer more advanced "true" hot swapping capabilities. +Spring Boot Developer Tools, JRebel, IntelliJ IDEA Enhanced HotSwap in Debug Mode, and Hotswap Agent are tools designed to improve developer productivity by enabling application reloading during development, reducing the need for full application restarts. Since Grails is built on Spring Boot, all four tools are compatible, but they differ in mechanisms, features, and trade-offs. Spring Boot Developer Tools is the default in Grails, replacing older agents like Spring Loaded (no longer maintained and lacking support for Java 17+). Hotswap Agent and JRebel offer more advanced "true" hot swapping capabilities. === Spring Boot Developer Tools From 31a766ca287811197f2b135f47246e6372fa3e15 Mon Sep 17 00:00:00 2001 From: James Fredley Date: Mon, 15 Dec 2025 13:42:19 -0500 Subject: [PATCH 5/5] Rephrase JRebel plugin mention for clarity --- .../src/en/guide/gettingStarted/developmentReloading.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc index b42754eb987..e4ccc7e7117 100644 --- a/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc +++ b/grails-doc/src/en/guide/gettingStarted/developmentReloading.adoc @@ -38,7 +38,7 @@ JRebel is a commercial tool that provides advanced hot swapping capabilities, al Please see the JRebel documentation for more details: https://manuals.jrebel.com/jrebel/standalone/springboot.html[JRebel]. -JRebel plugin for IntelliJ IDEA: https://plugins.jetbrains.com/plugin/4441-jrebel-and-xrebel[JRebel IntelliJ Plugin]. +Alternatively, use the JRebel plugin for IntelliJ IDEA: https://plugins.jetbrains.com/plugin/4441-jrebel-and-xrebel[JRebel IntelliJ Plugin]. *Reloading Mechanism:* True hot swapping via bytecode instrumentation; reloads classes, configurations, and resources without restarting the JVM, preserving application state.