In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article shows you the methods and steps of IDEA+JRebel to achieve automatic hot deployment, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Summary: JRebel is a JVM plug-in that makes changes to Java code without restarting the system and takes effect immediately. Hot deployment is not supported natively on IDEA. Generally, after updating the Java file, you have to restart the Tomcat server manually to take effect, especially affecting the development efficiency. By far the best solution for IDEA hot deployment is to install the JRebel plug-in.
Download and install JRebel
IDEA opens File | Settings | Plugins → searches JRebel for installation and restarts IDEA
Activate JRebel
Method 1: JRebel is a paid service, which can be purchased by activation code on the official website.
Method 2: activate through the github project. Project address https://github.com/ilanyu/ReverseProxy/releases/latest
It is recommended to build the agent on your own server.
# download image docker pull ilanyu/golang-reverseproxy# starts the image in the background. The port is mapped to 8888 (please modify the port by yourself) docker run-- name jrebel-d-p 8888 ilanyu/golang-reverseproxy
Generate GUID addresses online
After successful construction, the activation address is: http:// your server ip:8888/ {GUID}
Of course, your server can also bind the domain name, docker can also enable Https service, the activation address can be changed to https:// domain name / {GUID}, this way to explore their own, I will not demonstrate here.
Open IDEA to activate JRebel (initial activation may be different, but just go to the activation panel)
Click Change license to activate. Activate the successful interface
Be sure to manually switch to offline mode after activation, can be offline for 180 days, you can re-click the "Renew Offline Seat" refresh activation cycle at any time, and the activation status will be refreshed after 180 days.
Easy to use
After activation, the corresponding icon appears in the menu, and you can start your project through JRebel.
Rebel.xml needs to be added before startup (check which project you want to deploy hot, and it will be automatically configured for you. Two paths are configured by default in rebel.xml to monitor changes)
Officially start, the project needs to be configured correctly, for example, if you start the project with Tomcat, the Tomcat in IDEA should still be configured correctly. Choosing Run with JRebel instead of the previous run,JRebel at startup will help you start Tomcat and hot deployment.
Hot deployment of JRebel
Open File | Settings | Build, Execution, Deployment if it does not take effect | automatic compilation is checked for Compiler.
Shift+Ctrl+Alt+/, Select Registry check compiler.automake.allow.when.app.running
Check if rebel.xml has been added
Manually compile the current file Ctrl + Shift + F9
At this point, you don't have to restart tomcat every time you modify the code.
The above is the method and steps for IDEA+JRebel to achieve fully automated hot deployment. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.