This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.5.3!

Getting Started

To get started with the plugin it needs to be applied to your project.

The plugin is published to the Spring snapshots repository. Gradle can be configured to use the snapshots repository and the plugin can then be applied using the plugins block. To configure Gradle to use the snapshots repository, add the following to your settings.gradle (Groovy) or settings.gradle.kts (Kotlin):

  • Groovy

  • Kotlin

/*
 * Copyright 2012-present the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

pluginManagement {
	repositories {
		maven {
			url = 'http://repo.spring.io/milestone'
		}
		maven {
			url = 'http://repo.spring.io/snapshot'
		}
		gradlePluginPortal()
	}
}
pluginManagement {
	repositories {
		maven { url = uri("http://repo.spring.io/milestone") }
		maven { url = uri("http://repo.spring.io/snapshot") }
		gradlePluginPortal()
	}
}

The plugin can then be applied using the plugins block:

  • Groovy

  • Kotlin

/*
 * Copyright 2012-present the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

plugins {
	id 'org.springframework.boot' version '3.5.4-SNAPSHOT'
}
plugins {
	id("org.springframework.boot") version "3.5.4-SNAPSHOT"
}

Applied in isolation the plugin makes few changes to a project. Instead, the plugin detects when certain other plugins are applied and reacts accordingly. For example, when the java plugin is applied a task for building an executable jar is automatically configured. A typical Spring Boot project will apply the groovy, java, or org.jetbrains.kotlin.jvm plugin as a minimum and also use the io.spring.dependency-management plugin or Gradle’s native bom support for dependency management. For example:

  • Groovy

  • Kotlin

plugins {
	id 'java'
	id 'org.springframework.boot' version '3.5.4-SNAPSHOT'
}

apply plugin: 'io.spring.dependency-management'
plugins {
	java
	id("org.springframework.boot") version "3.5.4-SNAPSHOT"
}

apply(plugin = "io.spring.dependency-management")

To learn more about how the Spring Boot plugin behaves when other plugins are applied please see the section on reacting to other plugins.