Hot Deployment Techniques for Spring Boot: IDEA Configuration, Spring DevTools, and JRebel
This article explains three hot‑deployment methods for Spring Boot—IDEA's configuration options, the spring‑boot‑devtools library, and the JRebel plugin—detailing how to set them up, their underlying mechanisms, and best‑practice recommendations to avoid costly full restarts during development.
Introduction
In large projects the start‑up time and frequent restarts during debugging can waste a lot of time; hot deployment solves this by updating the running application without a full restart.
Hot Deployment Methods
Three common approaches are SpringBoot Configuration, spring‑boot‑devtools, and JRebel.
SpringBoot Configuration (IDEA)
IDEA provides a built‑in hot‑deployment option. Open Edit Configuration → Running Application Update Policies and choose either “On ‘Update’ action” (manual update via Build Project or Ctrl+F10) or “On frame deactivation” (automatic update when the IDE loses focus). For large projects the manual option is usually preferred.
spring‑boot-devtools
The devtools library uses two class loaders: one for unchanged third‑party JARs and a restart class loader for modified application classes. Adding the dependency to pom.xml enables automatic recompilation and class reloading.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>After adding the dependency, clicking Build Project triggers a hot reload, or you can configure IDEA to update automatically.
JRebel
JRebel is a JVM plugin that eliminates the build‑and‑redeploy cycle, allowing code changes to appear instantly while preserving application state. Install the plugin from the IDEA marketplace, activate it, and enable incremental compilation. Once configured, start the project with JRebel to enjoy real‑time updates.
Source: juejin.cn/post/7378328335036088359
Selected Java Interview Questions
A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.