Partner – Moderne – NPI EA (cat=Spring Boot)
announcement - icon

Refactor Java code safely — and automatically — with OpenRewrite.

Refactoring big codebases by hand is slow, risky, and easy to put off. That’s where OpenRewrite comes in. The open-source framework for large-scale, automated code transformations helps teams modernize safely and consistently.

Each month, the creators and maintainers of OpenRewrite at Moderne run live, hands-on training sessions — one for newcomers and one for experienced users. You’ll see how recipes work, how to apply them across projects, and how to modernize code with confidence.

Join the next session, bring your questions, and learn how to automate the kind of work that usually eats your sprint time.

Course – Black Friday 2026 – NPI EA – main – before_post_content
announcement - icon

Yes, we're now running our Black Friday Sale. All Courses are 33% off until 4th December, 2026 at 17:00 Romania time:

>> EXPLORE ACCESS NOW

Course – Black Friday 2026 – NPI – main – before_post_content
announcement - icon

Yes, we're now running our Black Friday Sale. All Courses are 33% off until 4th December, 2026 at 17:00 Romania time:

>> EXPLORE ACCESS NOW

1. Introduction

In this tutorial, we’ll learn about spring-boot-starter-parent. We’ll discuss how we can benefit from it for better dependency management, default configurations for plugins, and to quickly build our Spring Boot applications.

We’ll also see how we can override the versions of existing dependencies and properties provided by starter-parent.

2. Spring Boot Starter Parent

The spring-boot-starter-parent project is a special starter project that provides default configurations for our application and a complete dependency tree to quickly build our Spring Boot project. It also provides default configurations for Maven plugins, such as maven-failsafe-plugin, maven-jar-plugin, maven-surefire-plugin, and maven-war-plugin.

Beyond that, it also inherits dependency management from spring-boot-dependencies, which is the parent to the spring-boot-starter-parent.

We can start using it in our project by adding it as a parent in our project’s pom.xml:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.1.5</version>
</parent>

We can always get the latest version of spring-boot-starter-parent from Maven Central.

3. Managing Dependencies

Once we’ve declared the starter parent in our project, we can pull any dependency from the parent by just declaring it in our dependencies tag. We also don’t need to define versions of the dependencies; Maven will download jar files based on the version defined for the starter parent in the parent tag.

For example, if we’re building a web project, we can add spring-boot-starter-web directly, and we don’t need to specify the version:

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>

4. The Dependency Management Tag

To manage a different version of a dependency provided by the starter parent, we can declare the dependency and its version explicitly in the dependencyManagement section:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <version>3.1.5</version>
        </dependency>
    </dependencies>
</dependencyManagement>

5. Properties

To change the value of any property defined in the starter parent, we can re-declare it in our properties section.

The spring-boot-starter-parent via its parent spring-boot-dependencies uses properties for configuring all the dependencies versions, Java version, and Maven plugin versions. Therefore, it makes it easy for us to control these configurations by just changing the corresponding property.

If we want to change the version of any dependency that we want to pull from the starter parent, we can add the dependency in the dependency tag and directly configure its property:

<properties>
    <junit.version>4.11</junit.version>
</properties>

6. Other Property Overrides

We can also use properties for other configurations, such as managing plugin versions, or even some base configurations, like managing the Java version and source encoding. We need to re-declare the property with a new value.

For example, to change the Java version, we can indicate it in the java.version property:

<properties>
    <java.version>17</java.version>
</properties>

7. Spring Boot Project Without Starter Parent

Sometimes we have a custom Maven parent, or we prefer to declare all our Maven configurations manually.

In that case, we can opt not to use the spring-boot-starter-parent project. But we can still benefit from its dependency tree by adding a dependency, spring-boot-dependencies, in our project in import scope.

Let’s illustrate this with a simple example in which we want to use another parent other than the starter parent:

<parent>
    <groupId>com.baeldung</groupId>
    <artifactId>spring-boot-parent</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</parent>

Here, we used parent-modules, a different project, as our parent dependency.

Now, in this case, we can still get the same benefits of dependency management by adding it in import scope and pom type:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>3.1.5</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Furthermore, we can pull in any dependency by just declaring it in dependencies, as we did in our previous examples. No version numbers are needed for those dependencies.

8. Conclusion

In this article, we gave an overview of spring-boot-starter-parent, and the benefits of adding it as a parent in any child project.

Next, we learned how to manage dependencies. We can override dependencies in dependencyManagement or via properties.

The code backing this article is available on GitHub. Once you're logged in as a Baeldung Pro Member, start learning and coding on the project.
Partner – Moderne – NPI EA (tag=Refactoring)
announcement - icon

Modern Java teams move fast — but codebases don’t always keep up. Frameworks change, dependencies drift, and tech debt builds until it starts to drag on delivery. OpenRewrite was built to fix that: an open-source refactoring engine that automates repetitive code changes while keeping developer intent intact.

The monthly training series, led by the creators and maintainers of OpenRewrite at Moderne, walks through real-world migrations and modernization patterns. Whether you’re new to recipes or ready to write your own, you’ll learn practical ways to refactor safely and at scale.

If you’ve ever wished refactoring felt as natural — and as fast — as writing code, this is a good place to start.

Course – Black Friday 2026 – NPI EA – main – after_post_content

announcement - icon

Yes, we're now running our Black Friday Sale. All Courses are 33% off until 4th December, 2026 at 17:00 Romania time:

>> EXPLORE ACCESS NOW

Course – Black Friday 2026 – NPI – main – after_post_content

announcement - icon

Yes, we're now running our Black Friday Sale. All Courses are 33% off until 4th December, 2026 at 17:00 Romania time:

>> EXPLORE ACCESS NOW