Spring Boot works with any build system that can consume artifacts from the Maven Central repository, but Maven and Gradle are the two officially supported options. This page covers everything you need to go from zero to a working build configuration: system requirements, project generation with Spring Initializr, Maven and Gradle setup, and the optional Spring Boot CLI.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/spring-projects/spring-boot/llms.txt
Use this file to discover all available pages before exploring further.
System requirements
Java
Java 17 or later. Spring Boot 3.x requires a minimum of Java 17 and is compatible through Java 25.
Maven
Apache Maven 3.6.3 or later. Maven 3.9.x is recommended.
Gradle
Gradle 7.5 or later. Gradle 8.x is recommended.
Spring Initializr
The fastest way to create a Spring Boot project is start.spring.io. The Initializr generates a complete project archive with your chosen build system, language, Spring Boot version, and dependencies pre-configured.- Open start.spring.io in a browser.
- Choose Maven or Gradle as your build system.
- Set Group, Artifact, and Name for your project.
- Select Java 17 (or later) as the Java version.
- Add dependencies — for a web application, search for and add Spring Web.
- Click Generate to download the project archive.
- Unzip the archive and open it in your IDE.
Maven setup
Parent POM
Most Spring Boot Maven projects inherit fromspring-boot-starter-parent. This special POM configures sensible defaults for the Maven compiler, resource filtering, and the spring-boot-maven-plugin. It also provides a <dependencyManagement> section so that you can declare Spring Boot managed dependencies without specifying version numbers.
pom.xml
Notice that
spring-boot-starter-webmvc has no <version> tag. The parent POM’s dependency management provides the correct, tested version for the Spring Boot release you declared.Using spring-boot-dependencies without the parent POM
If you cannot usespring-boot-starter-parent (for example, because your project already inherits from a corporate parent POM), you can still benefit from Spring Boot’s dependency management by importing the spring-boot-dependencies BOM in your <dependencyManagement> section:
pom.xml
Maven plugin
Thespring-boot-maven-plugin adds a run goal for local development and a repackage goal that creates an executable jar during mvn package:
Gradle setup
Plugins
A Spring Boot Gradle project requires two plugins:org.springframework.boot— Provides thebootRunandbootJartasks.io.spring.dependency-management— Manages dependency versions, equivalent to the parent POM’s<dependencyManagement>.
build.gradle
Gradle tasks
Starters
Starters are a set of convenient dependency descriptors that you can include in your application. Each starter bundles the dependencies you are likely to need for a particular type of work, with managed transitive dependencies that are tested together. All official starters follow the naming patternspring-boot-starter-*. For example:
- Maven
- Gradle
pom.xml
Third-party starters should not use the
spring-boot-starter- prefix, which is reserved for official Spring Boot artifacts. A third-party starter for a project called thirdpartyproject would typically be named thirdpartyproject-spring-boot-starter.Spring Boot CLI
The Spring Boot CLI is an optional command-line tool that lets you quickly prototype applications using Groovy scripts. The CLI resolves@Grab dependencies automatically and runs Spring scripts without a full Maven or Gradle project structure.
Install with SDKMAN!
SDKMAN! is the recommended way to install and manage multiple versions of the CLI:Install with Homebrew (macOS)
Verify the installation
Choosing a build system
Maven
Recommended for teams already familiar with Maven’s POM model. The
spring-boot-starter-parent provides a complete, opinionated configuration out of the box.Gradle
Recommended for projects that need faster incremental builds, Kotlin DSL support, or more flexible build logic. The Spring Boot Gradle plugin provides equivalent functionality to the Maven plugin.
It is possible to use Spring Boot with other build systems such as Apache Ant with the
spring-boot-antlib AntLib module, but Maven and Gradle are the only officially supported options.What’s next
Quickstart
Build and run your first Spring Boot application step by step.
Introduction
Learn about auto-configuration, embedded servers, Actuator, and native images.