SpringBoot项目 在IDEA中实现热部署

原创
2020/12/31 17:47
阅读数 50

一、开启IDEA的自动编译(静态)

具体步骤: File -> Settings -> Default Settings -> Build -> Compiler 然后勾选 Build project automatically 。

二、开启IDEA的自动编译(动态)

具体步骤: Ctrl + Shift + Alt + / 然后进入Registry ,勾选自动编译并调整延时参数。

  • compiler.automake.allow.when.app.running -> 自动编译
  • compile.document.save.trigger.delay -> 自动更新文件

三、在POM文件添加依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>

 

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部