Backend Development 8 min read

Using JRebel for Local and Remote Hot Deployment in Spring Boot

This article explains how to install and configure JRebel for both local and remote hot deployment in Spring Boot projects, compares it with Spring DevTools, provides step‑by‑step setup instructions, and addresses multi‑module deployment pitfalls.

Code Ape Tech Column
Code Ape Tech Column
Code Ape Tech Column
Using JRebel for Local and Remote Hot Deployment in Spring Boot

Spring Boot developers often rely on the built‑in devtools for hot deployment, but the author argues that JRebel offers faster loading and a more convenient experience, making it worth a dedicated tutorial.

The author references a previous post on activating JRebel for readers who cannot afford the license and emphasizes that the original paid version is recommended for those who can.

Local hot deployment means that code changes are detected and applied without restarting the application, whereas remote hot deployment extends this capability to a server, allowing changes made locally to be reflected on the remote instance automatically.

Key differences between JRebel and devtools include:

JRebel loads changes faster than devtools.

JRebel works with any Java project, not only Spring Boot.

devtools cannot hot‑replace newly added methods or changed method signatures, while JRebel can.

To install JRebel, add the JRebel plugin to IntelliJ IDEA for local development and install the JRebel agent on the remote server for remote deployment.

For local hot deployment, enable Build project automatically in IDEA, then select the desired modules in the JRebel tool panel. This creates a rebel.xml file under src/resources and adds a JRebel run configuration to the main Spring Boot class.

After configuration, pressing CTRL+SHIFT+F9 recompiles only the changed parts without restarting the application.

Remote hot deployment requires installing JRebel on the server, setting a remote password with the command:

java -jar jrebel.jar -set-remote-password 123456789

Then configure the remote module in IDEA, which generates a rebel-remote.xml file. Package the Spring Boot application as a JAR and start it on the server with:

nohup java -agentpath:/usr/local/jrebel/lib/libjrebel64.so -Drebel.remoting_plugin=true -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9083 -jar xxx.jar &

In IDEA, add the remote server under File → Settings → JRebel → Remote Servers , providing the server name, URL (e.g., http://ip:port ), and the password set earlier.

After adding the server, clicking the remote deployment button (marked as ② ) uploads the changed code to the server and updates the running application instantly, with logs displayed in the JRebel Console.

When working with multi‑module projects (e.g., api , core , service ), only the module that produces the final JAR (typically api ) is hot‑deployed by default. To enable hot deployment for other modules, edit the rebel-remote.xml in the api project to include additional <id> entries for the other packages.

In summary, JRebel remains a powerful tool for both local and remote hot deployment, especially in complex backend Java projects, and can significantly improve development efficiency.

Javabackend developmentSpring BootIntelliJ IDEAremote debuggingJRebelHot Deployment
Code Ape Tech Column
Written by

Code Ape Tech Column

Former Ant Group P8 engineer, pure technologist, sharing full‑stack Java, job interview and career advice through a column. Site: java-family.cn

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.