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
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.
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;