当前位置:网站首页>Idea hot deployment (hot load)

Idea hot deployment (hot load)

2022-07-24 00:49:00 Classmate pan


introduction :

When we're in idea Created in spring boot project , After project operation , Every time you modify the code, you have to restart the project , This is very inconvenient, so we can idea In the middle of Thermal deployment , That is to say Thermal loading , It can automatically help developers restart spring boot project , So that after modifying the code, you can “ real time ” The purpose of seeing the new effect —— be supposed to “ real time ”, In fact, it also takes time

Add hot deployment framework support

If it's a new project , You can add it directly
 Insert picture description here
If it's an existing project , Please refer to ️ preparation — add to lombok To project

Turn on IDEA Automatic compilation of

This step requires setting idea Of the two settings, One is the current project settings, The other is the new project settings, The specific screenshot is as follows :
 Insert picture description here
 Insert picture description here

Start the hot deployment in operation

Different versions have different configurations , The configuration is divided into 2021.2 Configuration of previous versions and 2021.2 After the version Configuration of .

To configure idea2021.2 Previous version

Click the search button in the figure below
 Insert picture description here
Or just double-click shift key
 Insert picture description here
 Insert picture description here

To configure idea2021.2 Later versions

 Insert picture description here

Start project use debug, instead of run function

Because some use run and debug Can achieve hot deployment , And some can only use debug Can achieve , Therefore, it is recommended to use debug

 Insert picture description here
After the above settings , If you modify the code, you don't have to restart the project frequently , It detects code changes and restarts the project itself

原网站

版权声明
本文为[Classmate pan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/205/202207240048340254.html