Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
a666919a
Commit
a666919a
authored
Jun 06, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase prominence of warning about fully-executable jar compatibility
Closes gh-8927
parent
3aaf5b64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
deployment.adoc
spring-boot-docs/src/main/asciidoc/deployment.adoc
+17
-12
No files found.
spring-boot-docs/src/main/asciidoc/deployment.adoc
View file @
a666919a
...
...
@@ -449,8 +449,17 @@ of this guide.
[[deployment-install]]
== Installing Spring Boot applications
In additional to running Spring Boot applications using `java -jar` it is also possible
to make fully executable applications for Unix systems. This makes it very easy to install
and manage Spring Boot applications in common production environments.
to make fully executable applications for Unix systems. A fully executable jar can be
executed like any other executable binary or it can be <<deployment-service,registered
with `init.d` or `systemd`>>. This makes it very easy to install and manage Spring Boot
applications in common production environments.
WARNING: Fully executable jars work by embedding an extra script at the front of the
file. Currently, some tools do not accept this format so you may not always be able to
use this technique. For example, `jar -xf` may silently fail to extract a jar or war that
has been made fully-executable. It is recommended that you only make your jar or war
fully executable if you intened to execute it directly, rather than running it with
`java -jar` or deploying it to a servlet container.
To create a '`fully executable`' jar with Maven use the following plugin configuration:
...
...
@@ -465,7 +474,7 @@ To create a '`fully executable`' jar with Maven use the following plugin configu
</plugin>
----
With Gradle, the equivalent configuration
would be
:
With Gradle, the equivalent configuration
is
:
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]
----
...
...
@@ -475,19 +484,15 @@ With Gradle, the equivalent configuration would be:
----
You can then run your application by typing `./my-application.jar` (where
`my-application` is the name of your artifact).
`my-application` is the name of your artifact). The directory containing the
jar will be used as your application's working directory.
NOTE: Fully executable jars work by embedding an extra script at the front of the file.
Not all tools currently accept this format so you may not always be able to use this
technique.
NOTE: The default script supports most Linux distributions and is tested on CentOS and
[[deployment-install-supported-operating-systems]]
=== Supported operating systems
The default script supports most Linux distributions and is tested on CentOS and
Ubuntu. Other platforms, such as OS X and FreeBSD, will require the use of a custom
`embeddedLaunchScript`.
NOTE: When a fully executable jar is run, it uses the jar's directory as the working
directory.
[[deployment-service]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment