Intellij IDEA工具中配置热加载(springBoot)

  1. pom.xml添加依赖

      

    <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-devtools</artifactId>
                <optional>true</optional>
            </dependency>
    <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <fork>true</fork>
                    </configuration>
                </plugin>
            </plugins>
        </build>
  2. 修改idea配置

    File->Settings->Build,Execution,Deployment->Compiler  选中 Build project automatically项。

   3. Ctrl+Shift+A ,搜索Registry,双击 "Registry...",找到 compiler.automake.allow.when.app.running 并选中。

   启动项目,修改文件,即可自动编译。

原文地址:https://www.cnblogs.com/rana4504/p/12187871.html