1 pom中添加 spring-boot-devtools 依赖

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

2 更改设置

选中 File->Setting –> Build, Execution, Deployment –> Compiler–>Build project automatically 

 

3  SHIFT+CTRL+A  输入 registry 在弹出的窗口中

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

 

参考:

https://stackoverflow.com/questions/33349456/how-to-make-auto-reload-with-spring-boot-on-idea-intellij

https://www.mkyong.com/spring-boot/intellij-idea-spring-boot-template-reload-is-not-working/

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2021-09-15
  • 2021-11-20
  • 2022-01-07
  • 2021-10-01
  • 2021-12-16
相关资源
相似解决方案