1. 程式人生 > 程式設計 >springboot專案idea熱部署的教程詳解

springboot專案idea熱部署的教程詳解

1.新增依賴

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

2.開啟自動編譯

springboot專案idea熱部署的教程詳解

3.ctrl+shifi+alt+/

點選registry

springboot專案idea熱部署的教程詳解

選擇compiler autoMake allow when app running

springboot專案idea熱部署的教程詳解

接下來在你進行專案修改切換到瀏覽器時就會發現springboot重新載入了

4.排除熱部署範圍

將不需要熱部署的路徑定義到配置檔案中

spring.devtools.restart.exclude=static/**,public/**

總結

到此這篇關於springboot專案idea熱部署的文章就介紹到這了,更多相關springboot專案idea熱部署內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!