一、自动重启服务器
1、导入devtools依赖即可
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2、然后到setting框中,输入compiler,然后勾选Build project automatically

3、然后按住shift+alt+ctrl+/,进入maintenance,然后选择进入Registry
4、勾选compiler.automake.when.app.running

这样就可以实现自动重启服务器了