IDEA版本:多版本親測有效
這個版本以及以后的應(yīng)該都可以
一茧吊、settings
輸入make搜索到下圖配置項
Allow auto-make to start even if developed application is currently running
二袜蚕、compiler
settings里搜索compiler 找到右側(cè)build project automatically
來上效果測試看看:修改java類
這個效果還是很慢的大約3秒才能檢測到:
這里需要一個配置可以加快速度:
兩次shift,然后找到Registry...
進(jìn)去找個配置:
1称开、compiler.automake.postpone.when.idle.less.than
默認(rèn)是3000 改為 100即可
官方解釋:
英文:If at the moment the autobuild is about to start the IDE is idle for less than specified milliseconds, the automatic build will be postponed in order not to interfere with the user's activity.
中文翻譯:如果在自動構(gòu)建即將啟動IDE時亩钟,IDE的空閑時間小于指定的毫秒,則自動構(gòu)建將被推遲鳖轰,以避免干擾用戶的活動清酥。
簡單理解為,你修改了Java代碼后 按了Ctrl+s保存代碼后 多久觸發(fā)了自動編譯熱部署
2蕴侣、compiler.automake.trigger.delay
如果300覺得慢 可以改為100
官方解釋:
英文:Delay in milliseconds before triggering auto-make in response to file system events
中文翻譯:在觸發(fā)自動生成(auto-make)以響應(yīng)文件系統(tǒng)事件之前的延遲(毫秒)
簡單理解為:Idea檢測到文件變更后間隔多久就立馬觸發(fā)熱部署
3焰轻、compiler.document.save.trigger.delay
默認(rèn)1500改成100
官方解釋:
英文:Delay in milliseconds before triggering save in response to document changes
中文翻譯:觸發(fā)保存以響應(yīng)文檔更改之前的延遲(毫秒)
簡單理解為:idea檢測到文件變更后多久觸發(fā)文件保存 ****主要針對js css html靜態(tài)資源