java打包与热部署 爱上

<!-- 打包配置-->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
<mainClass>yzg.dataCenter.publicApi.ApiApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>


<!-- 热部署模块 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>true</scope><!-- 这个需要为 true 热部署才有效 -->
</dependency>
</dependencies>(说明放在dependencies里面)
原文地址:https://www.cnblogs.com/xgyweb/p/15578177.html