1)在pom文件中添加依赖:

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

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <!--该配置必须-->
                <fork>true</fork>
            </configuration>
        </plugin>
    </plugins>
</build>

2)左上角依次找到【File】——【Settings...】——【Build,Execution,Deployment】——【Compiler】,

勾选"Build project automatically",然后右下角【Apply】——【OK】:

idea热部署SpringBoot

3)点击idea右上角搜索图标,搜索"Registry",选择搜索出来的最后一个:

idea热部署SpringBoot

 

4)找到"compiler.automake.allow.when.app.running",勾选,

idea热部署SpringBoot

点击【Close】关闭:

5)重启idea

相关文章:

  • 2021-12-02
  • 2022-12-23
  • 2021-07-01
  • 2021-04-01
  • 2021-12-11
  • 2021-10-02
猜你喜欢
  • 2021-08-15
  • 2021-07-06
  • 2021-05-24
  • 2021-06-25
  • 2021-12-05
  • 2021-10-10
  • 2022-01-06
相关资源
相似解决方案