注意!!!!
springboot实现热部署需要1.3以上版本进行,实现热部署一共进行三步操作

第一步:在pom.xml文件中添加依赖

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

第二步:File->Settings->Build,Execution,Deployment->点击Complier,显示下图。
SpringBoot在Idea开发工具中设置热部署
第三步: 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。
SpringBoot在Idea开发工具中设置热部署
现在重新启动项目,每次改动代码,只要刷新浏览器就可以看到最新的改动了,有的时候不改变可能有缓存,可以清除一下。

相关文章:

  • 2021-06-08
  • 2021-09-27
  • 2022-01-13
  • 2021-10-19
  • 2022-12-23
  • 2021-08-12
  • 2021-06-05
  • 2021-12-29
猜你喜欢
  • 2022-12-23
  • 2021-05-28
  • 2021-04-16
  • 2022-12-23
  • 2021-04-01
  • 2021-12-15
相关资源
相似解决方案