1.需要在pom.xml中加入devtools依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
2.、然后到setting框中,输入compiler,然后勾选Build project automatically
3然后按住shift+alt+ctrl+/,进入maintenance,然后选择进入Registry
4、勾选compiler.automake.when.app.running
这样就可以实现自动重启服务器
然后按住shift+alt+ctrl+/,进入maintenance,然后选择进入Registry