<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
放在每一个要打jar包的微服务下面
SpringBoot 项目加下面的代码,不是不加
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
如果引用了父module spring-boot-starter-parent,
则默认是springboot 项目,不用配置 repackage