第一步
第二步
查看registry快捷键
第三步
根据快捷键打开配置:
配置项目
在pom.xml中配置依赖:
<!--热部署配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
配置插件:
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
.yml配置文件中配置开启热部署,这个地方默认就是开启的:
spring:
devtools:
restart:
enabled: true