Loading

spring boot 热部署


jar包:

<!-- 热部署 -->

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

在 application.properties 加上 需要重启的目录 等会一会就会重启了
#设置重启目录
spring.devtools.restart.additional-paths=src/main/java
#如果是idea 需要开起自动编译 

方式1 在 点击 file -> Settings -> Build -> Compiler -> Build project automatically 勾上

 


 方式2

 1、 快捷键  shift + ctrl + alt + / 

 2、点击 右上角的放大镜 输入 registry

 

 

 

 

 

  找到 : compiler.automake.allow.when.app.running 勾上 

  一开始是 很难找的 慢慢找会有的

 

 

 

 

 

这两种方式那个都行.......都搞好之后........记得重启idea..不然不见效的

 

 

 

 

 

 


posted @ 2020-03-01 12:00  TinaRoot  阅读(143)  评论(0编辑  收藏  举报