February 6, 2021

Spring Boot – Dependency Management

In this lesson, you will learn about build systems, Maven and Gradle.

But before we discuss Maven and Gradle, let’s first talk about Dependency Management


What is Dependency Management?

According to the Maven documentation, dependency management is “a mechanism for centralizing dependency information”.


About Dependency

First, let’s understand what dependency is. So when you are developing an application, you would probably need a number of libraries(normally jar files). It means that your application depends of these libraries. Hence the name dependency.


Now you need a way to assemble all these libraries and manage them in a centralized fashion. This also means that these libraries would be made available at compile time or runtime when needed. This is what dependency management does.

So the process of dependency management involves locating these dependencies and adding them to the classpath.


Maven Dependency Management

When you want to create a new project, you probably see that you can create Maven project. Now Maven is a popular dependency management tool. If you choose to create a Maven project, then you are simply saying that you would like to use Maven to manage dependencies.

If you are creating a spring application however, spring boot provides you with the initial dependencies you need for your application. But then, you can still add more from Maven Central Repository

You already know how to do this from Tutorial 3 and Tutorial 4.


Maven Central Repository

You can find hundreds of dependencies hosted in this repository. You simply need to search for it, then copy it to your pom.xml <dependencies></dependencies> section.

Structure of the dependencies section of the pom.xml file is shown below


	<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
	<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->


Watch the Video

5 1 vote
Article Rating
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
Antonio Borges
Antonio Borges
1 year ago

Favor enviar

Jermaine Junior Olajinde
Jermaine Junior Olajinde
7 months ago

Nice explanation