Déploiement à chaud de la configuration SpringBoot2.x

pom.xml

  1. Ajouter spring-boot-devtools

  2. Ajouter une fourchette à 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>	

Configuration d'IDEA

  1. Vérifier et configurer le projet de construction automatiquement dans les préférences
  2. Vérifiez et configurez compiler.automake.allow.when.app.running dans cmd + alt + shift + / Registry


Je suppose que tu aimes

Origine www.cnblogs.com/Peter2014/p/12751653.html
conseillé
Classement