IDEA设置代码热更新

引入了devtools依赖,目的是能够在配置、代码更新时,能够热启动项目,不用每次都手动停止,再启动,不过在Idea中需要进行如下两步,完成配置:

  1. Ctrl+Shift+Alt+/打开maintenance面板,选择第一个registry, 勾选compiler.automake.allow.when.app.running保存;
  2. Ctrl+Alt+S, 打开配置面板,在File | Settings | Build, Execution, Deployment | Compiler下勾选Build project automatically
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
posted @ 2021-02-04 10:30  vaen  阅读(3657)  评论(0)    收藏  举报