在IntelliJ IDEA中,SpringBoot项目通过devtools实现热部署

简要几个步骤:

一、添加依赖

<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>

三、启动自动构建


四、启动自动make


五、重启IDE,完成

最最重要的一步,很多文章没写到的:更改代码之后,必须按CTRL + F9

posted on 2018-06-13 13:36  桥边驿语人  阅读(74)  评论(0编辑  收藏  举报