idea热部署(自动刷新)

在原先使用eclipse的时候很容易布置了热部署

但是在idea的使用中写html的文件时候总是需要去重启浪费了很多时间

所以这篇博客主要讲解的是idea的热部署

配置idea的热部署需要两个步骤

一、

在pom文件中添加依赖

 <!--添加热部署-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
            <scope>true</scope>
        </dependency>
<plugin>
                <!--热部署配置-->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <!--fork:如果没有该项配置,整个devtools不会起作用-->
                    <fork>true</fork>
                </configuration>
            </plugin>

二、

设置IDEA的自动编译:
(1)File-Settings-Compiler勾选 Build Project automatically

(2)快捷键 ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running

这样我们的idea的热部署就完成了!

发布了42 篇原创文章 · 获赞 73 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/qq_34037264/article/details/102792507