springboot項目IDEA修改文件無需重啓的方法

1. 設置“File” 》 Settings 》 Build,Execution,Deplyment 》Compiler,勾選 Build project automatically

2. 使用組合鍵:“Shift+Ctrl+Alt+/” ,選擇 “Registry” ,找到key “compiler.automake.allow.when.app.running” 並勾選(如果是通過mvn clean spring-boot:run 命令啓動項目的話是不用設置這個的,但是如果是通過主類main方法啓動的話是必須要設置

3. pom.xml加上依賴

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章