Introduction
Spring Boot Starters are the dependency descriptor that can be included in the project. Spring Boot provides several Starters that can be used to add all the dependencies required for a project.
Spring Boot Starter Test is one of the starters provided by Spring Boot.
Let’s understand the Spring Boot Starters with examples.
Spring Boot Starters
As we already discussed in the introduction section, Spring Boot Starters are the dependency descriptor included in the project.
Spring Boot Starters can be added to the pom.xml file of our project as per the project's requirement. You need to add the starters to the pom.xml file, and those starters will automatically provide all the required dependencies.
For example, if we want to create a web application, we need to add spring-boot-starter-web in the pom.xml file. This spring-boot-starter-web itself contains a pom.xml in which all the required dependencies for a web application project are present.
The below starter for spring-boot-starter-web can be added to pom.xml to create a web applications:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Only the above starter is required to add to the pom.xml file, and this starter will automatically provide all the web-related dependencies.
Spring Boot provides several Starters that can be used to add all the dependencies required for a project. Let’s now discuss the spring-boot-starter-test in depth.
You can also consider our Spring Boot Course to give your career an edge over others.