Spring Boot 3.x new hot deployment configuration method (IntelliJ IDEA 2023.1)

More popular technical articles

Today, when I was teaching students at Jida University, I found that the way of configuring hot deployment in the Spring Boot project has changed a little bit. See below for details.

IDEA was recently updated to IntelliJ IDEA 2023.1 version
insert image description here

The first step is to add dependencies in the pom.xml file

<!--热部署配置 -->
 <dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-devtools</artifactId>
     <!-- 表示依赖不向下传递 -->
     <optional>true</optional>
 </dependency>

The second step is to configure Build project automatically

If you are using a Windows system, please follow the path of file -> settings -> Build, Execution, Deployment -> compiler to find build project automatically and check it, and finally Apply and OK;

If you are using a Mac system, please follow the path of IntelliJ IDEA -> settings -> Build, Execution, Deployment -> compiler to find the build project automatically and check it, and finally Apply and OK.
insert image description here

The third step is to enable the file modification on the fly

If you are using a Windows system, please follow the path of file -> settings -> Advanced Settings to find Allow auto-make to start even if developed application is currently running and check it, and finally Apply and OK;

If you are using a Mac system, please follow the path of IntelliJ IDEA -> settings -> Advanced Settings to find Allow auto-make to start even if developed application is currently running and check it, and finally Apply and OK;

insert image description here

If it can help you, please give me a thumbs up for your hard work, thank you in advance! Thanks, thanks ^_^

Guess you like

Origin blog.csdn.net/qq_41340258/article/details/131196899