超详细springboot热部署

超详细springboot热部署

①修改依赖

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

②配置 configuration(必须)

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <!-- 没有该配置,devtools 不生效 -->
                <fork>true</fork>
                <addResources>true</addResources>
            </configuration>
        </plugin>
    </plugins>
</build>

③file->setting->compiler勾选框
在这里插入图片描述

④Alt+shift+Ctrl+/出现框
在这里插入图片描述

在这里插入图片描述
⑤,修改好代码以后需要Ctrl+s才可以立即运行

发布了4 篇原创文章 · 获赞 2 · 访问量 177

猜你喜欢

转载自blog.csdn.net/weixin_43135178/article/details/82750103
今日推荐