IDEA SpringBoot專案配置熱更新的步驟詳解(無需每次手動重啟伺服器)
阿新 • • 發佈:2020-04-24
IDEA SpringBoot專案配置熱更新的步驟
1.在pom.xml中新增依賴:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
2.在pom.xml中新增外掛:
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin>
3.在IDEA中開啟 File → Settings,將 Compiler 中的 Build project automatically 勾選,點選 Apply。
4.完成後重啟SpringBoot即可實現專案熱更新,更改程式碼後只需按Ctrl+F9即可重新編譯,無需重啟。
到此這篇關於IDEA SpringBoot專案配置熱更新的步驟詳解(無需每次手動重啟伺服器)的文章就介紹到這了,更多相關IDEA SpringBoot配置熱更新內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!