From 168000235d3bfbb517c5eddf72ae8afe7eaec854 Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Fri, 20 Mar 2015 00:42:46 +0800 Subject: [PATCH] Update 19.2. Running as a packaged application.md --- .../19.2. Running as a packaged application.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/III. Using Spring Boot/19.2. Running as a packaged application.md b/III. Using Spring Boot/19.2. Running as a packaged application.md index e69de29..101c3b3 100644 --- a/III. Using Spring Boot/19.2. Running as a packaged application.md +++ b/III. Using Spring Boot/19.2. Running as a packaged application.md @@ -0,0 +1,11 @@ +### 19.2. 作为一个打包后的应用运行 + +如果使用Spring Boot Maven或Gradle插件创建一个可执行jar,你可以使用`java -jar`运行你的应用。例如: +```shell +$ java -jar target/myproject-0.0.1-SNAPSHOT.jar +``` +运行一个打包的程序并开启远程调试支持是可能的,这允许你将调试器附加到打包的应用程序上: +```shell +$ java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n \ + -jar target/myproject-0.0.1-SNAPSHOT.jar +```