springboot turns on hot deployment 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
    Insert image description here

  2. Update the value of
    Insert image description here
    Insert image description here

  3. IDEA restarts (the 2019 version does not need to be restarted to take effect)

Guess you like

Origin blog.csdn.net/wyr1235/article/details/129332403