IDEA 设置springboot项目热部署

1.开启工程自动编译

 2.  Ctrl + Shift + Alt + / 然后选择Registry,开启运行时允许自动编译

<!-- 热部署依赖 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <!-- 将依赖关系标记为可选<optional>true</optional>,防止使用项目将devtools传递性地应用于其他模块 -->
    <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>

CTRL+F9

手动刷新

原文地址:https://www.cnblogs.com/418836844qqcom/p/12196846.html