The first step is to introduce dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
The second step is to set up the idea
ctl+alt+s open the idea configuration menu
the fourth step
ctrl+shift+alt+/ select Registry
Enter running, tick
Follow the above steps, ok