SpringBoot热重启配置

1.添加依赖

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>    不能被其它模块继承,如果多个子模块可以去掉  不必须
           <scope>runtime</scope>     只在运行时起作用  打包时不打进去
</dependency> 

安装成功后查看maven 依赖 如果存在spring-boot-devtools 并且没有红线证明成功添加

2.要重新编译项目

重启服务器

idea:

设置File ->Setting ->Compile: 勾选“Build project automatically”选项

原文地址:https://www.cnblogs.com/guangzhou11/p/12305919.html