From 711bc6dfb07451b617fb3d99893d2a77602ec869 Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Mon, 9 Mar 2015 23:32:12 +0800 Subject: [PATCH] Update 55.4. Packaging your application.md --- .../55.4. Packaging your application.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/VII. Spring Boot CLI/55.4. Packaging your application.md b/VII. Spring Boot CLI/55.4. Packaging your application.md index e69de29..1300382 100644 --- a/VII. Spring Boot CLI/55.4. Packaging your application.md +++ b/VII. Spring Boot CLI/55.4. Packaging your application.md @@ -0,0 +1,15 @@ +### 55.4. 应用打包 + +你可以使用`jar`命令打包应用程序为一个可执行的jar文件。例如: +```shell +$ spring jar my-app.jar *.groovy +``` +最终的jar包括编译应用产生的类和所有依赖,这样你就可以使用`java -jar`来执行它了。该jar文件也包括来自应用classpath的实体。你可以使用`--include`和`--exclude`添加明确的路径(两者都是用逗号分割,同样都接收值为'+'和'-'的前缀,'-'意味着它们将从默认设置中移除)。默认包含(includes): +```shell +public/**, resources/**, static/**, templates/**, META-INF/**, * +``` +默认排除(excludes): +```shell +.*, repository/**, build/**, target/**, **/*.jar, **/*.groovy +``` +查看`spring help jar`可以获得更多信息。