第一步:引入热加载的插件,springboot 1.3开始就有的
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
project 中添加spring-boot-maven-plugin,主要在eclipse中起作用,idea不需要加此配置,springboot 项目的话,应该是有此配置,加里面的内容即可。
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
第二部 : idea设置
1、点击: file ,Settings ,Build ,Execution,Deplment
然后记得apply,ok。
2、组合键:Shift+ALT+Ctrl+/ ,选择“Registry”,回车,找到“complier.automake.allow.when.app.running”
网友评论