Creating a Spring Boot executable JAR

The Spring Boot magic would not be complete without providing a nice way to package the entire application including all of its dependencies, resources, and so on in one composite, executable JAR. After the JAR file is created, it can simply be launched by running a java –jar <name>.jar command.

We will continue with the application code that we built in the previous chapters and will add the necessary functionalities to package it. Let's go ahead and take a look at how to create the Spring Boot Uber JAR.

Note

The Uber JAR is typically known as an application bundle encapsulated in a single composite jar that internally contains a /lib directory with all the dependent inner jars and optionally a /bin directory ...

Get Spring Boot Cookbook 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.