1.引入热部署依赖

使用devtools启动热部署,添加devtools库,在配置文件中把Spring devtools.restart.enabled设置为true:
Springboot 热部署(idea版)

2.勾选idea自动编译

settings—>Compiler—>勾选Build project automatically
Springboot 热部署(idea版)
Springboot 热部署(idea版)

3.允许应用在运行时启动自动编译

  1. 快捷键Ctrl+shift+a
  2. 输入Registry
  3. 勾选compiler.automake.allow.when.app.running

Springboot 热部署(idea版)

4.重新启动项目即可

相关文章:

  • 2021-10-10
  • 2022-01-06
  • 2021-12-02
  • 2022-12-23
  • 2021-07-01
  • 2021-04-01
猜你喜欢
  • 2021-08-15
  • 2021-11-25
  • 2021-07-06
  • 2021-05-24
  • 2021-09-01
  • 2021-06-25
  • 2021-12-05
相关资源
相似解决方案