Skip to main content

08 Idea 热更新

1 添加开发工具相关依赖

pom.xml
 <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.5.6</version>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
...
</build>

2 idea设置

2.1 启用自动编译

2.2 启用触发自动编译的事件