idea修改html不能立刻生效,解决idea debug模式下修改代码却不能生效
IDEA環境下使用devtools實現熱加載與熱部署實現修改代碼不需重啟
1.引入devtools的maven依賴
org.springframework.boot
spring-boot-devtools
true
2.在 plugin 中配置另外一個屬性 fork,并且配置為 true。
org.springframework.boot
spring-boot-maven-plugin
true
3.設置IDEA
運行時編譯配置:組合鍵:“Shift+Ctrl+Alt+/” ,選擇 “Registry” ,選中打勾 “compiler.automake.allow.when.app.running” 。
4.自動化編譯配置:
“File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,選中打勾 “Build project automatically” 。
5. 進行一下application.properties配置
在有些版本我們需要配置熱加載生效的開關,使其值等于true。下文是properties格式配置,喜歡yml格式的同學可以自行調整一下
#熱加載生效
spring.devtools.restart.enabled=true
#額外新增的熱加載目錄
spring.devtools.restart.additional-paths= src/main/java
#熱加載排除目錄
#spring.devtools.restart.exclude=
參考
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的idea修改html不能立刻生效,解决idea debug模式下修改代码却不能生效的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 自动挡汽车挂倒挡是咔嚓一声响怎么回事?
- 下一篇: jetty服务器上运行html页面,we