IDEA SpringBoot 热部署

  1. 开启 build project automatically
    快捷键:ctrl + shift + a
    快捷键选择 build project automatically
    勾选确认

  2. 开启compiler.auto.make.allow.when.app.running
    快捷键:ctrl + shift + a
    快捷键选择
    勾选确认

  3. spring-boot-devtools
<dependency>
    <groupId>org.springframework.bootgroupId>
    <artifactId>spring-boot-devtoolsartifactId>
    <scope>runtimescope>
dependency>

以上方法可以实现完全自动编译,重启部署。但是个人更喜欢下面的办法

  1. 添加spring-boot-devtools支持
<dependency>
    <groupId>org.springframework.bootgroupId>
    <artifactId>spring-boot-devtoolsartifactId>
    <scope>runtimescope>
dependency>
  1. 手动build project
    IDEA SpringBoot 热部署_第1张图片

你可能感兴趣的:(IDEA SpringBoot 热部署)