pom.xml:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <addResources>true</addResources> </configuration> </plugin>
application.yml:
spring: devtools: livereload: enabled: true restart: enabled: false
idea配置:
ctrl+F9 build 之后即可 ctrl+alt+F10 重启服务