springframework-course

Spring Boot Starters

When developing an application with Spring Framework, we usually include all the dependencies for the application to run.

Adding all of those dependencies to pom.xml or build.gradle not only takes time, but it also increases the file size.

So Spring Boot has the solution to this problem by introducing the spring boot starters, which works on the mathematical concept transitive dependency.

That is, A belong B, B belongs C, and C belong A. In dependency terms if DependencyA belongs to DependencyB, DependencyB belongs to DependencyC, and DependencyC belongs to DependencyA.

So Spring Boot Starters combines all the related dependencies into single dependency. Instead of adding all related dependencies, we are required only to add one dependency.

For example, For Spring MVC web application, if we add only spring-boot-starter-web, related all the dependencies will download and available in IDE classpath

SpringBootStarterWeb

Spring Boot Starters are a collection of dependency descriptors that ease Spring Boot application configuration and dependency management. They make it easy to add common groups of dependencies to your project without having to explicitly declare each one. While the Spring Boot Starters do not have a defined hierarchical structure, they may be classified depending on their functionality or purpose. The following is a broad classification of various widely used Spring Boot Starters:

1. Core Starters

spring-boot-starter: The core starter that includes all essential dependencies for building a Spring Boot application

2. Web Starters

3. Data Access Starters

4. Security Starters

5. Actuator Starters

6. Testing Starters

For more information please go through Spring Boot Starter Documentation