Skip to content

Spring Boot production packaging

Spring Boot production packaging is a stage in the Spring Boot development lifecycle focused on preparing the application for deployment^[600-developer-spring-springboot.md].

Overview

In the standard workflow, packaging occurs after the development phase (running the application) and often involves the use of specific build tools to generate a distributable format^[600-developer-spring-springboot.md]. The Spring Boot documentation outlines this process under "Packaging Your Application for Production"^[600-developer-spring-springboot.md].

Build Tools

To package an application, developers typically select from standard build systems supported by the ecosystem, such as Maven or Gradle^[600-developer-spring-springboot.md].

Packaging Format

The most common method for production deployment is to package the application as a fat jar^[600-developer-spring-springboot.md]. This format bundles the application code along with all its dependencies into a single, executable Java Archive.

Packaging is part of the broader "Developing with Spring Boot" lifecycle, which includes:

  • Structuring Your Code: Designing the codebase^[600-developer-spring-springboot.md].
  • Auto-configuration: Setting up automatic configurations^[600-developer-spring-springboot.md].
  • Developer Tools: Utilizing tools that may assist in the packaging process^[600-developer-spring-springboot.md].

Sources

^[600-developer-spring-springboot.md]