SpringBoot2.x configuration hot deployment

pom.xml

  1. Add spring-boot-devtools

  2. Add fork to true

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <!--编译时不会打包-->
  <scope>runtime</scope>
</dependency>

<build>
  <plugins>
    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      <!--添加<fork>true</fork>-->
      <configuration>
        <fork>true</fork>
      </configuration>
    </plugin>
  </plugins>
</build>	

IDEA configuration

  1. Check and configure Build project automatically in Preferences
  2. Check and configure compiler.automake.allow.when.app.running in cmd + alt + shift + / Registry


Guess you like

Origin www.cnblogs.com/Peter2014/p/12751653.html