As a JAVA programmer, waiting for code to compile is a pain. Moreover, the pursuit of high efficiency is a natural quality of programmers.
In the process of contacting the powerful springboot framework, every time the code is modified, it must be restarted. I just thought that there must be a way to achieve hot loading/deployment after code modification. Sure enough, springboot has already prepared a solution for us, which is convenient and fast. After collecting some information, verify it yourself, the following methods are feasible, please refer to the following methods to set. (This article uses idea as an example)
Step 1: Add the following dependencies to pom.xml
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-devtools</artifactId>
- </dependency>
Step 2: Open the idea, File->Settings-> Build-Execution-Deployment -> Compiler
Check Build Project Automatically .
Step 3: Press Shift+Ctrl+A (windows, mac is command+shift+A)
You will see a pop-up window Enter Action or option name, enter " registry", double-click the first item "Registry...", another window will pop up, look for
compiler.automake.allow.when.app.running
This item, and tick to enable. Then close the window.