Good hot deployment for development and debugging twice the result with half the effort, such “god skills” how can miss it, the use of IDEA children’s shoes hurriedly come in a stroke.
Learning goals
Quickly learn how to use hot deployment plug-ins to run projects and improve development efficiency.
Quick access to
IDEA Quick Start Tutorial (2018 Edition)
Special Reading: SpringBoot Sermon Series
I. Enable automatic compilation of IDEA (static)
For details, go to File > Settings > Default Settings > Build > Compiler and select Build Project Automatically.
2. Enable automatic compilation of IDEA (dynamic)
Detailed steps: Hold down Ctrl + Shift + A at the same time, then enter Registry in the popup box, check automatic compilation and adjust the delay parameters.
- Compiler. Automake. Allow. The when. App. Running – > automatic compilation
- The compile. Document. Save. The trigger. Delay – > automatic update files
PS: very few people mention the compile online. The document. Save. The trigger. The delay it is primarily for the update of static files such as JS, CSS, reducing latency, press F5 to refresh the page to see the effect directly!
3. Enable the hot deployment strategy of IDEA (very important)
To do this, go to the top menu -> Edit Configurations->SpringBoot Plug-in -> Target Project -> Check hot Updates.
4. Add hot deployment plug-ins to the project (optional)
Tips: If the old project is very bloated, so that the automatic hot restart every time slow development efficiency, I suggest directly remove the spring-boot-devTools dependency in POM, and then use Ctrl+Shift+F9 manual boot-free quick update!!
To do this, add the hot deployment plug-in to the POM file
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
Copy the code
5. Disable browser cache (Important)
Open Google Browser, open the Network TAB of F12, and check [✅] Disable Cache.
Hot deployment exactly how cool, in the words of Slag Hui, just three minutes of experience, you will do as I do, love this Yo West.