<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
网友评论