IDEA 2022 热部署
1 pom.xml
使用 SpringBoot 热部署,需要在 pom.xml 引入 dev-tool 的启动器
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
然后配置插件,需要在 spring-boot-maven-plugin 插件中配置参数
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
2 automake
打开 settings 里面找到截图中的位置,File->Settings->Build,Execution,Deployment->Compiler,勾选 build project automatically