一、devtools方式
1、修改pom.xml
1.1 <dependencies>下:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>
1.2 <build>下的<plugin>标签中:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--fork:如果没有该项配置,整个devtools不会起作用-->
<fork>true</fork>
</configuration>
</plugin>
2、设置IDEA的自动编译:
2.1 File-Settings-Compiler勾选 Build Project automatically
2.2 快捷键 ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running
二、 JRebel方式
这里就不实操了。
声明:学习记录,若有错误,欢迎指正
作者:借我丹青妙笔