开启 build project automatically
快捷键:ctrl + shift + a
开启compiler.auto.make.allow.when.app.running
快捷键:ctrl + shift + a
- spring-boot-devtools
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
以上方法可以实现完全自动编译,重启部署。但是个人更喜欢下面的办法
- 添加spring-boot-devtools支持
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
- 手动build project