© Marten Deinum 2018
Marten DeinumSpring Boot 2 Recipeshttps://doi.org/10.1007/978-1-4842-3963-6_11

11. Packaging

Marten Deinum1 
(1)
Meppel, Drenthe, The Netherlands
 

In this chapter you will take a look at different solutions for packaging a Spring Boot based application.

11.1 Create an Executable Archive

By default, Spring Boot creates a JAR or WAR and that can be run with java -jar your-application.jar. However, you might want to run the application as part of the startup of your server (currently tested and supported for Debian and Ubuntu-based systems). For this you can use the Maven or Gradle plugins to create an executable jar.

Problem

You want an executable JAR so that it can be installed as service on your environment.

Solution

The Spring Boot ...

Get Spring Boot 2 Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.