步骤
Adding devtools to your project
1
2
3
4
5
6<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>Adding plugin to your pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13<!--热启动插件-->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>Enabling automatic build
Update the value of
win:
ctrl+shift+Alt+/
and search for the registryMac:
option+command+shift+/
In registry, check
restart IDEA