0% found this document useful (0 votes)
2 views

SpringBootstarterParent

The spring-boot-starter-parent dependency is a parent POM that manages dependencies and plugins for Spring Boot applications, providing default versions and configurations. It inherits from spring-boot-dependencies, which specifies the default library versions used in Spring Boot. Additionally, the document lists various popular Spring Boot starters and their associated transitive dependencies.

Uploaded by

Suresh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SpringBootstarterParent

The spring-boot-starter-parent dependency is a parent POM that manages dependencies and plugins for Spring Boot applications, providing default versions and configurations. It inherits from spring-boot-dependencies, which specifies the default library versions used in Spring Boot. Additionally, the document lists various popular Spring Boot starters and their associated transitive dependencies.

Uploaded by

Suresh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

spring-boot-starter-parent dependency which is used internally by all spring

boot dependencies.

What is spring-boot-starter-parent
dependency?
The spring-boot-starter-parent dependency is the parent POM providing
dependency and plugin management for Spring Boot-based applications. It
contains the default versions of Java to use, the default versions of
dependencies that Spring Boot uses, and the default configuration of the
Maven plugins.

<?xml version="1.0" encoding="UTF-8"?>


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/
maven-4.0.0.xsd;
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${revision}</version>
<relativePath>../../spring-boot-dependencies</relativePath>
</parent>
<artifactId>spring-boot-starter-parent</artifactId>
<packaging>pom</packaging>
<name>Spring Boot Starter Parent</name>
<description>Parent pom providing dependency and plugin management for applications
built with Maven</description>
<properties>
<java.version>1.8</java.version>
<resource.delimiter>@</resource.delimiter> <!-- delimiter that doesn't clash with
Spring ${} placeholders -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>

...

<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/application*.yml</include>
<include>**/application*.yaml</include>
<include>**/application*.properties</include>
</includes>
</resource>

</project>

The spring-boot-starter-parent dependency further inherits from spring-


boot-dependencies, which is defined at the top of above POM file at line
number : 9.

This file is the actual file which contains the information of default version to
use for all libraries. The following code shows the different versions of
various dependencies that are configured in spring-boot-dependencies:

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/


2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://
maven.apache.org/xsd/maven-4.0.0.xsd;
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${revision}</version>
<relativePath>../../spring-boot-dependencies</relativePath>
</parent>
<artifactId>spring-boot-starter-parent</artifactId>
<packaging>pom</packaging>
<name>Spring Boot Starter Parent</name>
<description>Parent pom providing dependency and plugin management for
applications
built with Maven</description>
<properties>
<java.version>1.8</java.version>
<resource.delimiter>@</resource.delimiter> <!-- delimiter that doesn't
clash with Spring ${} placeholders -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</
project.reporting.outputEncoding>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>

...

<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/application*.yml</include>
<include>**/application*.yaml</include>
<include>**/application*.properties</include>
</includes>
</resource>

</project>

Popular templates and their transitive


dependencies
I am listing down some very frequently use spring starters and what
dependencies they bring along, for information only.

STARTER DEPENDENCIES

spring-boot-starter spring-boot, spring-context, spring-beans

spring-boot-starter- jersey-container-servlet-core, jersey-container-servlet,

jersey jersey-server

spring-boot-starter-
spring-boot-actuator, micrometer-core
actuator

spring-boot-starter-aop spring-aop, aspectjrt, aspectjweaver


spring-boot-starter-
spring-hateoas, spring-data-rest-webmvc
data-rest

spring-boot-starter-
spring-hateoas
hateoas

spring-boot-starter-
logback-classic, jcl-over-slf4j, jul-to-slf4j
logging

spring-boot-starter-
log4j2, log4j-slf4j-impl
log4j2

spring-boot-starter-
spring-security-web, spring-security-config
security

spring-test, spring-boot,junit,mockito, hamcrest-library,


spring-boot-starter-test
assertj, jsonassert, json-path
spring-boot-starter-web-
spring-ws-core
services

You might also like