问题现象:

双击没有反应,CMD下运行java -jar xxx.jar 后提示:xxx.jar中没有主清单属性

问题分析:

1.可能是没有maven插件 spring-boot-maven-plugin。

2. 没有指定入口(main方法),或者指定错误。

解决方法:

针对第一问题:

        查看项目打包的pom.xml文件中,是否缺少插件:spring-boot-maven-plugin

org.springframework.boot

spring-boot-maven-plugin

true

${project.name}

org.apache.maven.plugins

maven-compiler-plugin

8

8

针对第二问题:

在IntelliJ IDEA工具中设置Artifacts

1.

 2.

3. 进行build

参考阅读

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: