springboot jar包太大设置分包
2020-06-17 本文已影响0人
勤劳的杯子
<build>
<plugins>
<!--解决SpringBoot打包成jar后运行提示没有主清单属性-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<layout>ZIP</layout>
<includes>
<!-- 设置没有jar包-->
<include>
<groupId>nothing</groupId>
<artifactId>nothing</artifactId>
</include>
</includes>
<!-- <classifier>exec</classifier>-->
<mainClass>com.sdworan.ShengbenDuckApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>
启动时
java -Dloader.path=lib/ -jar shenck-web.jar