springboot项目开启热部署
引入devtools依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
在application.yml配置以下内容
spring:
devtools:
restart:
enabled: true
additional-paths: src/main/java
idea开启热部署所需条件
ctrl+shift+alt+/ 点击Registry勾选compiler.automake.allow.when.app.running
打开Edit Configuration设置以下内容