【SpringBoot框架学习】热部署 的配置 详解

Youzg LOGO

Maven依赖:

<!--配置 热部署-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>

开启 “热部署”:

在plugins标签增加如下标签:

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <!-- 开启 “热部署” -->
    <configuration>
        <fork>true</fork>
    </configuration>
</plugin>

调整 IDEA默认配置:

Compiler的配置:

config1

Registry的配置:

键盘按下

ctrl + alt + shift + /

在如下界面配置:
config2
config4

这样,我们再次修改后,就不需要重启服务器,
只需要在等待几秒,服务器就会自动将我们修改后的项目热部署了!


posted @ 2020-06-17 14:50  在下右转,有何贵干  阅读(149)  评论(0编辑  收藏  举报