一、開啓idea使項目自動功能
1、File--setting--Build,Execution,Deployment-- Gradle-Android Compiler 勾選如圖所示;
2、 CTRL + SHIFT + A --> 查找Registry --> 找到並勾選compiler.automake.allow.when.app.running
二、springBoot 開啓熱部署
1、添加maven依賴
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2、開啓熱部署
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>//該配置必須
</configuration>
</plugin>
</plugins>
</build>
完成以上操作就可以愉快的編輯代碼了,修改 類 或 配置文件 按下 Ctrl + s 應用會自動重啓;