Spring Boot Starter Parent

In this post, we will discuss how Spring Boot Starter Parent helps with managing dependency versions, the Java version used by the project, and the default configuration for plug-ins.

What is the Spring Boot Starter Parent and How to use it?

All Spring Boot projects typically use spring-boot-starter-parent as the parent in pom.xml.
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.4.RELEASE</version>
    </parent>
spring-boot-starter-parent allows us to manage the following things for multiple child projects and modules:
  • Configuration - Java Version and Other Properties
  • Dependency Management - Version of dependencies
  • Default Plugin Configuration
We should need to specify only the Spring Boot version number on this dependency. If you import additional starters, you can safely omit the version number.

What does Spring Boot Starter Parent inherit from spring-boot-dependencies?

Spring Boot Dependencies defines the default dependency management for all Spring Boot projects. If we would want to use a new version of a specific dependency, we can override the version by specifying a new property in the project pom. The below list shows some of the important dependencies that are managed by Spring Boot Dependencies parent pom. Since Spring Boot Starter Parent inherit from spring-boot-dependencies, it shares all these characteristics as well.
<properties>
 <activemq.version>5.15.4</activemq.version>
 <antlr2.version>2.7.7</antlr2.version>
 <appengine-sdk.version>1.9.64</appengine-sdk.version>
 <artemis.version>2.4.0</artemis.version>
 <aspectj.version>1.8.13</aspectj.version>
 <assertj.version>3.9.1</assertj.version>
 <atomikos.version>4.0.6</atomikos.version>
 <bitronix.version>2.1.4</bitronix.version>
 <build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
 <byte-buddy.version>1.7.11</byte-buddy.version>
 <caffeine.version>2.6.2</caffeine.version>
 <cassandra-driver.version>3.4.0</cassandra-driver.version>
 <classmate.version>1.3.4</classmate.version>
 <commons-codec.version>1.11</commons-codec.version>
 <commons-dbcp2.version>2.2.0</commons-dbcp2.version>
 <commons-lang3.version>3.7</commons-lang3.version>
 <commons-pool.version>1.6</commons-pool.version>
 <commons-pool2.version>2.5.0</commons-pool2.version>
 <couchbase-cache-client.version>2.1.0</couchbase-cache-client.version>
 <couchbase-client.version>2.5.9</couchbase-client.version>
 <derby.version>10.14.1.0</derby.version>
 <dom4j.version>1.6.1</dom4j.version>
 <dropwizard-metrics.version>3.2.6</dropwizard-metrics.version>
 <ehcache.version>2.10.5</ehcache.version>
 <ehcache3.version>3.5.2</ehcache3.version>
 <elasticsearch.version>5.6.10</elasticsearch.version>
 <embedded-mongo.version>2.0.3</embedded-mongo.version>
 <exec-maven-plugin.version>1.5.0</exec-maven-plugin.version>
 <flatten-maven-plugin.version>1.0.1</flatten-maven-plugin.version>
 <flyway.version>5.0.7</flyway.version>
 <freemarker.version>2.3.28</freemarker.version>
 <git-commit-id-plugin.version>2.2.4</git-commit-id-plugin.version>
 <glassfish-el.version>3.0.0</glassfish-el.version>
 <groovy.version>2.4.15</groovy.version>
 <gson.version>2.8.5</gson.version>
 <h2.version>1.4.197</h2.version>
 <hamcrest.version>1.3</hamcrest.version>
 <hazelcast.version>3.9.4</hazelcast.version>
 <hazelcast-hibernate5.version>1.2.3</hazelcast-hibernate5.version>
 <hibernate.version>5.2.17.Final</hibernate.version>
 <hibernate-jpa-2.1-api.version>1.0.2.Final</hibernate-jpa-2.1-api.version>
 <hibernate-validator.version>6.0.11.Final</hibernate-validator.version>
 <hikaricp.version>2.7.9</hikaricp.version>
 <hsqldb.version>2.4.1</hsqldb.version>
 .......
</properties>
Find more default settings on spring-boot-dependencies pom.xml
Learn the latest release of Spring Boot on Spring Boot Tutorial

Comments