经过确认 是 MANIFEST.MF 文件有问题
Class-Path的格式要严格执行一下规则!
1)在 Class-Path: 后面有一个空格,切记2)在 Class-Path: 后面写上你的jar 用空格分开
3)如果需要换行,切记在上一行末尾一定要有一个空格,下一行的开头一定要有一个空格
附上pom插件配置
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.test.Main</mainClass>
</manifest>
<manifestEntries>
<Class-Path>conf/</Class-Path>
<Specification-Version>${project.version}</Specification-Version>
<Implementation-Version>${project.version}</Implementation-Version>
<Specification-Title>${project.artifactId}</Specification-Title>
</manifestEntries>
</archive>
<excludes>
<exclude>**/application.properties</exclude>
<exclude>**/logback.xml</exclude>
</excludes>
<jarName>app</jarName>
</configuration>
</plugin>
MANIFEST.MF文件内容
Main-Class: com.meizu.store.ordercenter.HkApplication
Class-Path: ./