SpringBoot热部署

587 阅读1分钟

开启热部署操作四步走 :pom添加插件,setting 设置,registry配置,重启IDEA 。

pom添加插件

<!--      开启热部署-->
    <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
    </dependencies>
<!--        构建配置-->
    <build>
<!--        进行整个功能打jar包的插件-->
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
<!--        开启热部署-->
                <configuration>
                    <fork>true</fork>
                </configuration>
            </plugin>
        </plugins>
    </build>

setting 设置


registry配置


重启IDEA 

一定要重启哦,这步很重要。