© 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.