idea+springboot实现热部署

1、ctrl+alt+s,打开设置界面,修改如下

idea+springboot实现热部署

2、ctrl+alt+shift+/打开界面,修改如下

idea+springboot实现热部署

3、pom.xml中添加如下信息

idea+springboot实现热部署

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-devtools</artifactId>
   <optional>true</optional>
</dependency>
<build>
   <plugins>
      <plugin>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
         <configuration>
            <fork>true</fork>
         </configuration>
      </plugin>
   </plugins>
</build>
 
4、重启服务