不是.
MANIFEST.MF类似如下:
Manifest-Version: 1.0
Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx
Spring-Boot-Layers-Index: BOOT-INF/layers.idx
Start-Class: com.example.demo.DemoApplication
Spring-Boot-Classes: BOOT-INF/classes/
Spring-Boot-Lib: BOOT-INF/lib/
Spring-Boot-Version: 2.7.14
Main-Class: org.springframework.boot.loader.JarLauncher
jar包的主类为org.springframework.boot.loader.JarLanuncher.
可以引入spring-boot-loader依赖来查看JarLanucher的源码:
implementation 'org.springframework.boot:spring-boot-loader'