一、idea项目里springboot配置热部署
a) Idea设置
Settings->Build,Execution,Deployment->Compiler 勾选 Build project automatically
b) 添加pom依赖
<!-- 热部署 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
c)pom添加设置
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork> <!--fork : 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart -->
</configuration>
</plugin>
</plugins>
</build>
d)任意修改源代码 并且 Ctrl+F9 bulid
在eclipse中 项目是会自动编译的 可是在IDEA 中 我们需要 手动按ctrl+F9 让它再编译一下
e)idea设置自动编译
组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running”