在当前应用(或父pom.xml)下的pom.xml文件中加入:
<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>
</plugin>
</plugins>
</build>