Last weekend, I helped Yang Xiaoxie (my college roommate) debug the project remotely. SpringBoot build, no hot deployment, change will have to restart the relevant module. Little bug, got me for over an hour, most of the time was still building (hell, I’ll have to charge you next time). I told him there was a hot deployable plugin called Jrebel that was hot deployable and that every time you changed the code and needed to test it, you just had to Build it? All Java projects are available and he doesn’t know it. As a handsome boy, I had to write this article to teach him to use hot deployment.

What is Jrebel?

JRebel is a JAVA virtual machine plug-in that allows JAVA programmers to see the immediate impact of code changes on an application without redeploying. JRebel allows you to see the changes to code, classes, and resources individually in real time, and you can upload them one by one rather than deploy them all at once. When a programmer makes a change to any class or resource in the development environment, the change is directly reflected in the deployed application, bypassing the build and deployment process.

In short, whether you change a class or a resource, simply rebuild the relevant class and the changes are reflected directly into your application.

Equal to install

Open your IntelliJ IDEA plugin marketplace and search for Jrebel, the first one being. Click Install to install and then restart IDEA.

Equal to activate

After the restart, the following box will pop up to prompt activation. Select the Team Url, where the email address is optional, and the authentication service address format is jrebel.qekang.com/{GUID}. It requires a GUID parameter, which needs to be generated from the GUID server. Its address is www.guidgen.com/, and it opens directly to generate a GUID (do not use this one, it may not work), as shown below:

The duplicate GUID is padded after the authentication service address. Such as: jrebel.qekang.com/7bea5149-69…

Click Change License to activate the license.

Equal to use

Click the Jrebel option in the left sidebar of IDEA to configure the modules that need hot deployment, as shown in the picture below. You can directly tick the box.

Once you’re ready, you’ll find two ICONS in the toolbar as shown below: Start the project in Jrebel Run mode and Jrebel Debug mode (usually used for some modules that need to be tested). Now start the XXXX_COLLECT module in debug mode.

The startup succeeded. Suppose I am now dissatisfied with the application and modify the Java class named xxxxFeignClientApi under the just checked XXXX_COLLECT module, as shown below:

This does not require a reboot, just need to rebuild the related class, if too many changes, directly build the module.

That’s how to use Jrebel. Jrebel saves up to 5.25 weeks of deployment time per year (according to Jrebel officials).

The last

If you see this, you like this article, please share and like it. Wechat search “an excellent waste person”, after attention to reply “1024” to send you a complete set of Java tutorial.