springboot聚合工程打包

在入口工程中的POM文件中添加如下配置:

 <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>

                <configuration>
                    <!-- 指定启动类 -->
                    <mainClass>**.**.WebApplication</mainClass>
                    <layout>ZIP</layout>
                    <!--开启devtools-->
                    <fork>true</fork>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <!--依赖的包重新打包到生成的Jar包中-->
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
原文地址:https://www.cnblogs.com/wugang/p/14140094.html