springboot项目热部署


这里使用 springboot-devtools

  1. 导入坐标

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
    </dependency>

    此时热部署已经生效,但是还需要手动点击Build project或者按快捷键Ctrl+F9来让 idea 重新构建项目(编译修改后的类)

    开启自动构建:

  2. 在 idea 中开启Settings -> Complier -> Build project automatically

    idea 版本:2022.2

  3. 开启Settings -> Advanced Settings -> Allow auto-make to start even if developed application is currently running


文章作者: Wujiu
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Wujiu !
  目录