首页 > 编程语言 > 详细

IDEA 热启动,每次更改代码后不用重启服务(SpringBoot项目)

时间:2021-04-29 15:10:55      阅读:14      评论:0      收藏:0      [点我收藏+]

1、ctrl+Shift+Alt+/,选择Registry

技术分享图片

2、勾选 compiler.automake.allow.when.app.running(可能不按首字母排序,可以多找找)

技术分享图片

 

3、Setting--->Compiler--->勾选Build project automatically

技术分享图片

 

4、pom.xml增加依赖(这种方式值适用于springboot项目)

 

技术分享图片
技术分享图片
<!-- 热部署模块 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <!-- 这个需要为 true 热部署才有效 -->
</dependency>
技术分享图片
技术分享图片
技术分享图片
技术分享图片
<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                </configuration>
            </plugin>
        </plugins>
</build>
技术分享图片
技术分享图片

技术分享图片

IDEA 热启动,每次更改代码后不用重启服务(SpringBoot项目)

原文:https://www.cnblogs.com/xxlfly/p/14716805.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!