Springboot鑷姩鍔犺浇宸ュ叿-devtools鐨勭悊瑙d笌浣跨敤
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Springboot鑷姩鍔犺浇宸ュ叿-devtools鐨勭悊瑙d笌浣跨敤相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/div' title='div'>div
time tps 榛樿 澹版槑 鏂规硶 rtc 淇敼 framework澹版槑:鏈枃鍙傝€冭嚜:https://blog.csdn.net/mylovewanzi/article/details/104059933
浣跨敤spring-boot-devtools鐨勫簲鐢ㄧ▼搴忓皢鍦ㄧ被璺緞涓婄殑鏂囦欢鍙戠敓鏇存敼鏃惰嚜鍔ㄩ噸鏂板惎鍔ㄣ€?/span>
鍦╬om.xml鏂囦欢涓姞鍏ヤ竴涓嬩緷璧?/span>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
杩欓噷澶氫簡涓€涓猳ptional锛屼负true琛ㄧず椤圭洰鍦?span style="color: #ff0000;">鎵撳寘鐨勬椂鍊欎笉浼氳鎵撳寘杩涢」鐩腑銆?/span>
姝ゆ椂锛屽彧瑕乧lasspath涓嬬殑鏂囦欢鍙戠敓浜嗗彉鍖栵紝椤圭洰灏变細鑷姩閲嶅惎锛岃繖鏋佸ぇ鐨勬彁楂樹簡椤圭洰鐨勫紑鍙戦€熷害
瑕佹槸椤圭洰鑷姩缂栬瘧锛宨dea杩橀渶鍋氫竴浜涚畝鍗曠殑閰嶇疆銆?/span>
鎵撳紑setting锛屽嬀閫夎嚜鍔ㄦ瀯寤洪」鐩€?/span>
鐒跺悗鎸変綇CTRL+SHIFT+ALT+/
锛岃皟鍑哄涓嬮〉闈細閫夋嫨绗竴涓?/span>
鐒跺悗鎵惧埌濡備笅锛屽苟鍕鹃€夛細
閲嶅惎IDEA锛岃繖鏄綘灏卞彲浠ヤ娇鐢╠evtools鏉ヨ嚜鍔ㄦ瀯寤洪」鐩簡銆?/span>
springboot涓嚜鍔ㄩ噸鍚」鐩殑鍘熺悊锛?/span>
銆€銆€springboot涓湁涓や釜绫诲姞杞藉櫒锛屼竴涓槸basecalssloader锛岃礋璐i」鐩紩鐢ㄧ殑绗笁鏂筳ar锛岃繖绫籮ar鏈変竴绉嶇壒鏂帮紝灏辨槸涓嶄細鍙樺寲锛涘彟涓€涓姞杞藉櫒鏄痳estartcalssloader锛屽畠鐢ㄦ潵鍔犺浇鑷繁鍐欑殑class锛岃繖鍐欑被鏄湁鍙兘鍙樺寲鐨勩€傚綋椤圭洰闇€瑕侀噸鍚椂锛宺estartclassloader浼氳鏂板垱寤虹殑绫诲姞杞藉櫒鏇夸唬锛岃€宐aseclassloader鍒欎笉浼氾紝杩欒灏辩渷鍘讳簡閲嶆柊鍔犺浇绗笁鏂筳ar鍖呯殑鏃堕棿锛岃嚜鐒跺惎鍔ㄩ€熷害灏辨瘮鍐峰惎鍔ㄨ蹇€?/span>
闈欐€佽祫婧愭枃浠讹細
銆€銆€榛樿鎯呭喌涓嬶紝闈欐€佽祫婧愭枃浠剁殑淇敼鏄笉瑙﹀彂椤圭洰閲嶅惎鐨勩€傚綋鐒朵篃涓嶆槸涓嶈兘锛屽紑鍙戣€呭彲浠ヨ嚜宸卞畾涔夈€?/span>
闇€瑕佸湪閰嶇疆鏂囦欢涓坊鍔狅細
spring.devtools.restart.exclude=static/**
杩欒〃绀簊tatic鐩綍涓嬬殑闈欐€佽祫婧愭枃浠剁殑淇敼涔熶細瑙﹀彂椤圭洰閲嶅惎銆?/span>
杩樻湁鍙︿竴绉嶆柟寮忥紝涔熸槸鍚屾牱鐨勬晥鏋滐細
spring.devtools.restart.additional-paths=src/main/resources/static
缂栫爜鏄竴涓繛缁殑杩囩▼锛屾湁鏃跺€欓噸鍚お棰戠箒浜嗭紝涓嶄粎娴垂鐢佃剳鎬ц兘锛屼篃娴垂鎴戠殑瀹濊吹鏃堕棿銆傛湁涓€涓柟娉曞彲浠ヨВ鍐宠繖涓棶棰橈紝灏辨槸鍦ㄤ綘闇€瑕侀噸鍚」鐩椂锛屼慨鏀逛竴涓?span style="color: #ff0000;">鎸囧畾鐨勬枃浠讹紝鍙湁杩欎釜鎸囧畾鐨勬枃浠惰淇敼鎵嶈兘瑙﹀彂閲嶅惎椤圭洰锛岄厤缃涓嬶細
spring.devtools.restart.trigger-file=.trigger-file
鍏跺疄闈欐€佽祫婧愭枃浠剁殑淇敼鏄病蹇呰閲嶅惎椤圭洰鐨勶紝devtools榛樿閿叆浜哃iveReload鏈嶅姟鍣紝鍙互瑙e喅闈欐€佽祫婧愮殑鐑儴缃层€傚彧闇€瑕佸湪chrome瀹夎livereload鎻掍欢鍗冲彲銆?/span>
以上是关于Springboot鑷姩鍔犺浇宸ュ叿-devtools鐨勭悊瑙d笌浣跨敤的主要内容,如果未能解决你的问题,请参考以下文章
JQuery/JS鎻掍欢 jsTree鍔犺浇鏍戯紝鍒濆鍖栨椂鍔犺浇鍓嶄笁绾ц妭鐐癸紝褰撳睍寮€绗笁绾ц妭鐐规椂 灏卞姞杞借鑺傜偣涓嬬殑鎵€鏈夊瓙鑺傜偣