Idea热部署

spring热部署

一、导入依赖

在pom.xml文件中添加如下依赖

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
</dependency>
<plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                    <addResources>true</addResources>
                </configuration>
</plugin>

二、更改idea的设置

![img]( https://img-blog.csdnimg.cn/4d26eba43266464c8631d9a2596d4f6a.png?x-oss-process=image/watermark ,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBASW5fZG9sZW50,size_20,color_FFFFFF,t_70,g_se,x_16)

![img]( https://img-blog.csdnimg.cn/487dbd03baa549c1b44058bfa73d42a3.png?x-oss-process=image/watermark ,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBASW5fZG9sZW50,size_20,color_FFFFFF,t_70,g_se,x_16)

应用设置后更改类后配置立即生效,即热部署成功。

posted @ 2024-06-25 18:20  3088577529  阅读(23)  评论(0)    收藏  举报