IntelJ IDEA关于SpringBoot的热部署设置

1.    在Maven的POM中加上:devtools依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>


2.    在Maven插件中打开热部署:

<plugins>
    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
            <fork>true</fork>
        </configuration>
    </plugin>
</plugins>


3.    File—>Setting-->

IntelJ IDEA关于SpringBoot的热部署设置
4.    在主窗口,按ctrl+shift+alt+/

IntelJ IDEA关于SpringBoot的热部署设置
5.    选择第一个:registy
 IntelJ IDEA关于SpringBoot的热部署设置
OK!先运行程序,再编辑文件,保存后看看是否有反应。