Javatpoint Logo
Javatpoint Logo

Dependency Management

Spring Boot manages dependencies and configuration automatically. You don't need to specify version for any of that dependencies.

Spring Boot upgrades all dependencies automatically when you upgrade Spring Boot.

Note - We can also specify a version by overriding Spring Boot recommendations if we think that's necessary.

Note - Each release of Spring Boot is associated with a base version of the Spring Framework so we highly recommend you to not specify its version on your own.


Maven Dependency Management System

The Maven project inherits the following feature from the parent project.

  • Java version 1.6 as the default compiler.
  • UTF-8 source encoding.
  • A Dependency Management section which allows you to exclude <version> tags for common.
  • Dependencies, inherited from the spring-boot-dependencies POM.
  • Sensible resource filtering.
  • Sensible plugin configuration.

Inheriting the starter parent

We can configure our project to inherit from the spring-boot-starter-parent by simply setting as below.

Note - You should only need to specify the Spring Boot version number on this dependency. If you import additional starters, you can safely exclude the version number.

Changing the Java version

we can easily set Java version for our project in the properties section as given below.


Adding Spring Boot Maven Plugin

We can include Maven plugin in our pom.xml file. It is used to package the project as an executable jar. We are adding it here.






Please Share

facebook twitter google plus pinterest tumbler

Learn Latest Tutorials