文章目录


idea springboot 热部署,让项目不再重启_maven

1:添加devtools

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

2:添加maven插件

<build>
<finalName>springcloud-study</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>

3:abcd打钩

idea springboot 热部署,让项目不再重启_springboot_02

4: 选择2个选项

idea中按住快捷键:

ALT + SHIFT + CTR + /

idea springboot 热部署,让项目不再重启_spring_03


勾选这2个:

idea springboot 热部署,让项目不再重启_spring_04

5:重启

重启idea