springboot开启热部署Devtools

  1. Adding devtools to your project

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>
  1. Adding plugin to your pom.xml
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <fork>true</fork>
                <addResources>true</addResources>
            </configuration>
        </plugin>
    </plugins>
</build>
 

  1. Enabling automatic build
    在这里插入图片描述

  2. Update the value of
    在这里插入图片描述
    在这里插入图片描述

  3. idea重启(2019版本不需要重启即可生效)

猜你喜欢

转载自blog.csdn.net/wyr1235/article/details/129332403