1.在pom文件中添加如下
<plugins>
<!--解决SpringBoot打包成jar后运行提示没有主清单属性-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>