pom.xml 中配置: 

 

<!-- 热部署 : 提高开发者的开发效率,无需手动重启Spring Boot应用 -->

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-devtools</artifactId>

<scope>runtime</scope>

<optional>true</optional>

</dependency>

 

谷歌浏览器安装

liveReload 插件即可

 

 

1  在IDEA中, 我们需要 按Ctrl + F9 编译

2 在 IDEA 中配置

  • CTRL + SHIFT + A 查找 勾选 make project automatically 选项

  • ctrl+shift+alt+/ 查找Registry 勾选 compiler.automake.allow.when.app.running 选项

 

 

sprringboot 之 热部署

 

这样就可以在springboot 项目不需要重启就可以更新静态资源

 

 

 

 

 

 

相关文章: