The introduction of pom. The XML

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>
Copy the code
<plugin>  
        <groupId>org.springframework.boot</groupId>  
        <artifactId>spring-boot-maven-plugin</artifactId>  
        <configuration>  
          <fork>true</fork>  
        </configuration>  
        <dependencies>  
          <! Spring Hot deployment -->  
          <! -- https://mvnrepository.com/artifact/org.springframework/springloaded -->  
          <dependency>  
            <groupId>org.springframework</groupId>  
            <artifactId>springloaded</artifactId>  
            <version>1.2.6. RELEASE</version>  
          </dependency>  
        </dependencies>  
      </plugin
Copy the code

The properties of the configuration

Effective # hot deployment spring. Devtools. Restart. Enabled:true# set to restart directory spring. Devtools. Restart. Additional - paths: SRC/main/Java # classpath directory of the WEB - INF folder content changes not restart spring.devtools.restart.exclude:WEB-INF/ * *Copy the code

Or yML configuration

Spring: devtools: restart: hot deployment takes effect Enabled: true # Additional -paths: SRC /main/ Java #classpath exclude: WEB-INF/**Copy the code


\