Starters (most commonly associated with Spring Boot) are curated Maven dependencies that bundle together a tested, compatible set of libraries and transitive dependencies for a specific type of functionality. Adding one starter to pom.xml replaces what would otherwise be many individual dependency declarations.
Key Points: • A single starter, like spring-boot-starter-web, pulls in everything needed for that capability (embedded Tomcat, Spring MVC, Jackson) with compatible versions already resolved. • Starters eliminate the need to manually track compatible versions of many related libraries, reducing "dependency hell." • They follow convention-over-configuration, applying sensible defaults so developers can focus on business logic instead of wiring. • Combined with a BOM (Bill of Materials) like spring-boot-dependencies, starters ensure version alignment across the whole project. • Starters make onboarding faster since new projects can be bootstrapped with a small, well-known set of dependencies.
Example: Instead of manually declaring Spring MVC, an embedded servlet container, Jackson, and validation libraries with compatible versions, a developer just adds spring-boot-starter-web to pom.xml and gets a working, tested combination immediately.
Code Example:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>Interview Tip: A concise interview answer is:
"Starters bundle a tested, version-aligned set of dependencies for a specific capability, like spring-boot-starter-web pulling in Spring MVC and an embedded servlet container together. They save you from manually tracking compatible versions of many related libraries and make project setup much faster and less error-prone."