idea+springBoot项目热部署使用

idea下载插件 JRebel 如图 下载后重启 idea
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
pom.xml引用配置

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>true</scope>
            <optional>true</optional>
        </dependency>
 <build>
	<plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
	</plugin>
 </build>

sprinngboot  热部署
按住 ctrl + shift +alt +/
在这里插入图片描述
修改这三个

compiler.automake.trigger.delay
compiler.document.save.trigger.delay
compiler.automake.allow.when.app.running

在这里插入图片描述
这个配置可有可无

spring:
  #      热部署配置
  thymeleaf:
    prefix: classpath:/templates/
    suffix: .html
    mode: HTML
    encoding: utf-8
    servlet:
      content-type: text/html
    cache: false

在这里插入图片描述
重启idea 如下图dibug启动,每次修改代码之后按ctrl+s保存 会自动编译,亲测有效在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值