Idea 配置 Spring Boot devtools

  1. pom.xml中添加依赖

  org.springframework.boot
  spring-boot-devtools
  true

2.打开Idea的设置,在 compiler 中将 Build project automatically选中

项目设置

  1. 打开Idea的全局搜索(在macOS中双击Shift键唤出),搜索registry


    搜索打开registry

4.在registry窗口中,将compiler.automake.allow.when.app.running选中

在registry中设置

经过以上设置,当项目运行的时候,修改模版文件,将不用重启项目就能生效,修改java文件的时间,将会触发自动重启。

参考链接:Spring Boot 101 (Part 8) - Live Reload / Hot Swap

你可能感兴趣的:(Idea 配置 Spring Boot devtools)