springboot在idea实现热部署

本文转自:https://www.cnblogs.com/QW-lzm/p/8972107.html

1.在pom.xml引入热部署devtools依赖

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

2.在pom.xm的下面的plugin 添加如下:

<configuration>
     <fork>true</fork>
</configuration>

 

3.编辑完pom.xml文件后,需设置两个地方

  1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically”

  2) 快捷键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running”

posted @ 2018-12-24 10:53  Bk小凯笔记  阅读(192)  评论(0编辑  收藏  举报