文章目录
场景
打包运行报错:打包运行报no main manifest attribute, 包的大小也只有几十kb
解决
spring-boot-maven-plugin添加repackage配置,这会把引入jar
xml
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.4.RELEASE</version>
<!-- 2.2.4.RELEASE-->
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>