开发修改代码后,无需重启idea的服务。

1 模块中添加依赖

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

 

2 父POM.XML添加

<build>
<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 设置编译选项

SpringBoot 开发环境热部署_重启

 

 4.更新值

Ctrl+shift+alt+/ 调出 Maintenance 选择 Registry

SpringBoot 开发环境热部署_SpringCloud_02

 

选中:

compiler.automake.allow.when.app.running

actionSystem.assertFocusAccessFromEdt

 

SpringBoot 开发环境热部署_SpringCloud_03

 

 5.重启 Intellij IDEA