Cinder元件詳解
阿新 • • 發佈:2021-11-17
springboot熱部署
在開發過程中,通常會對一段業務程式碼不斷地修改測試,在修改之後往往需要重啟服務,有些服務需要載入很久才能啟動成功,這種重複操作極大的降低了程式開發效率。Spring Boot框架專門提供了進行熱部署的依賴啟動器 spring-boot-devtools,用於進 行專案熱部署,而無需手動重啟專案。
具體實現步驟如下:
(1)在pom.xml檔案中新增spring-boot-devtools的依賴;
<!-- 熱部署依賴--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
(2)IDEA 熱部署設定:在IDEA中,進入“Settings”介面,開啟 Build下的Compiler 面板設定頁面,在右側勾選 “Build project automatically” 選項將專案設定為自 動編譯;
(3)在idea裡面 按下“ ctrl + shift + alt + /
點選註冊
如下圖所示,勾選該選項:
(4)配置專案更新策略
(5)重新啟動IDEA即可。