Springboot打包jar后用命令行运行显示没有主清单
1. maven中引入spring boot父依赖
引入父依赖的目的,只是在于对要依赖的jar包做版本管理
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>2.1.9.RELEASE</version>
</parent>
2. pom中引入打包插件
<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>