1.添加依賴
1
2
3
4
5
6
|
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional> true </optional> <scope> true </scope> </dependency> |
2.開啟自動編譯
3.ctrl+shifi+alt+/
點擊registry
選擇compiler autoMake allow when app running
接下來在你進行項目修改切換到瀏覽器時就會發現springboot重新加載了
4.排除熱部署范圍
將不需要熱部署的路徑定義到配置文件中
1
|
spring.devtools.restart.exclude= static /**, public /** |
總結
到此這篇關于springboot項目idea熱部署的文章就介紹到這了,更多相關springboot項目idea熱部署內容請搜索服務器之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持服務器之家!
原文鏈接:https://www.cnblogs.com/sfencs-hcy/p/13491368.html