spring boot+ Intellj idea devtools 热部署配置

步骤1:

添加如下maven依赖

<!-- 热启动,热部署依赖包,为了调试方便,加入此包 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

步骤2:

<plugins>
    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
            <!-- 如果没有该项配置,devtools不会起作用,即应用不会restart -->
            <fork>true</fork>
        </configuration>
    </plugin>
</plugins>

步骤3:

spring boot+ Intellj idea devtools 热部署配置

步骤4:

按ctrl+shift+alt+/

spring boot+ Intellj idea devtools 热部署配置

spring boot+ Intellj idea devtools 热部署配置

最后重启idea,热部署成功

有补充者楼下可留言