天天看點

springboot2.0 熱更新方式(devtools)

  1. 修改pom.xml
    <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-devtools</artifactId>
         <optional>true</optional>
     </dependency>
               
  2. 使用intelliJ IDEA

    方法1) 在修改的的這個檔案标簽上選擇 “Recompile xxxx”,即可單獨編譯。

    方法2) 直接選擇 Ctrl + Shift +F9 ,即可單獨編譯。

    非常友善。