From 594357c328a11d25761a1f179635fa823eb4462c Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Sun, 10 May 2015 22:57:12 +0800 Subject: [PATCH] Update D.3.1. Launcher manifest.md --- X. Appendices/D.3.1. Launcher manifest.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/X. Appendices/D.3.1. Launcher manifest.md b/X. Appendices/D.3.1. Launcher manifest.md index e69de29..0e59201 100644 --- a/X. Appendices/D.3.1. Launcher manifest.md +++ b/X. Appendices/D.3.1. Launcher manifest.md @@ -0,0 +1,15 @@ +### D.3.1 Launcher manifest + +你需要指定一个合适的Launcher作为`META-INF/MANIFEST.MF`的`Main-Class`属性。你实际想要启动的类(也就是你编写的包含main方法的类)需要在`Start-Class`属性中定义。 + +例如,这里有个典型的可执行jar文件的MANIFEST.MF: +```properties +Main-Class: org.springframework.boot.loader.JarLauncher +Start-Class: com.mycompany.project.MyApplication +``` +对于一个war文件,它可能是这样的: +```properties +Main-Class: org.springframework.boot.loader.WarLauncher +Start-Class: com.mycompany.project.MyApplication +``` +**注**:你不需要在manifest文件中指定`Class-Path`实体,classpath会从嵌套的jars中被推导出来。