Thursday, June 18, 2026

Maven Dependencies and Spring Boot Starters

Maven projects use dependencies to include external libraries. If your Maven project is a Spring Boot application, you can use Spring Boot dependency starters. A Spring Boot dependency starter is a collection of related libraries that enables a specific capability in your application, such as building web applications, accessing databases or securing endpoints.

The "Most Common Production REST API" Stack

If you inspect a typical business API in 2026, you'll often see something close to:

Usual Name Dependency Name
Spring Web spring-boot-starter-web
Testing spring-boot-starter-test
Spring Data JPA spring-boot-starter-data-jpa
Validation spring-boot-starter-validation
Spring Security spring-boot-starter-security
Actuator spring-boot-starter-actuator
PostgreSQL Driver org.postgresql:postgresql
Lombok org.projectlombok:lombok

That set alone probably covers 70–80% of typical Spring Boot backend applications built for internal tools, SaaS products, e-commerce systems, and microservices.

Common Starter Dependencies

Usual Name Dependency Name Used For Provides
Spring Web spring-boot-starter-web REST APIs, MVC web applications, JSON endpoints, file uploads, HTTP clients Spring MVC, Embedded Tomcat, Jackson, Servlet API integration, content negotiation
Spring Data JPA spring-boot-starter-data-jpa Relational databases, CRUD applications, enterprise systems Hibernate, Spring Data Repositories, JPA support, transaction management
Validation spring-boot-starter-validation Request validation, DTO validation, domain validation Jakarta Bean Validation, Hibernate Validator, @Valid, validation annotations
Spring Security spring-boot-starter-security Authentication, authorization, securing APIs and web applications Spring Security, security filters, password encoding, authentication framework
Actuator spring-boot-starter-actuator Monitoring, health checks, metrics, observability Health endpoints, metrics, readiness/liveness probes, application info
Testing spring-boot-starter-test Unit testing, integration testing, mocking JUnit 5, Mockito, AssertJ, Spring Test, MockMvc
WebFlux spring-boot-starter-webflux Reactive APIs, non-blocking applications, streaming Spring WebFlux, Reactor, Netty, reactive programming model
Cache spring-boot-starter-cache Application caching, performance optimization Spring Cache abstraction, cache annotations (@Cacheable, etc.)
JDBC spring-boot-starter-jdbc Direct SQL access without JPA JDBC support, connection pooling, JdbcTemplate, transaction support
OAuth2 Client spring-boot-starter-oauth2-client Login with Google, GitHub, Azure AD, Okta, etc. OAuth2 Login, OpenID Connect (OIDC), OAuth2 client support
OAuth2 Resource Server spring-boot-starter-oauth2-resource-server JWT-secured APIs, bearer token authentication JWT validation, OAuth2 resource server support
WebSocket spring-boot-starter-websocket Real-time communication, chat applications, live updates WebSocket support, STOMP messaging integration
Mail spring-boot-starter-mail Sending emails JavaMail integration, email templates support
Thymeleaf spring-boot-starter-thymeleaf Server-side rendered HTML pages Thymeleaf template engine integration
Mustache spring-boot-starter-mustache Lightweight server-side templating Mustache template engine integration
GraphQL spring-boot-starter-graphql GraphQL APIs Spring GraphQL, schema-based APIs, GraphQL endpoint support
Batch spring-boot-starter-batch Scheduled jobs, ETL, bulk processing Spring Batch framework, job orchestration, chunk processing
Integration spring-boot-starter-integration Enterprise integration patterns, messaging workflows Spring Integration, message channels, adapters
AMQP (RabbitMQ) spring-boot-starter-amqp Messaging, event-driven architectures RabbitMQ integration, message listeners, message converters
RSocket spring-boot-starter-rsocket Reactive network communication RSocket protocol support, bidirectional messaging

Common Non-Starter Dependencies

These are not Spring Boot starters but are extremely common.

Usual Name Dependency Name Used For Provides
PostgreSQL Driver org.postgresql:postgresql PostgreSQL database connectivity JDBC driver
MySQL Driver com.mysql:mysql-connector-j MySQL database connectivity JDBC driver
MariaDB Driver org.mariadb.jdbc:mariadb-java-client MariaDB database connectivity JDBC driver
SQL Server Driver com.microsoft.sqlserver:mssql-jdbc SQL Server connectivity JDBC driver
Oracle Driver com.oracle.database.jdbc:ojdbc11 Oracle database connectivity JDBC driver
Redis spring-boot-starter-data-redis Caching, distributed sessions, key-value storage RedisTemplate, repositories, cache integration
MongoDB spring-boot-starter-data-mongodb NoSQL document databases MongoDB repositories, document mapping
Elasticsearch spring-boot-starter-data-elasticsearch Search, analytics, indexing Elasticsearch repositories and operations
Kafka org.springframework.kafka:spring-kafka Event streaming, messaging Kafka producers, consumers, listeners
Lombok org.projectlombok:lombok Reducing boilerplate code Generated getters, setters, builders, constructors
OpenFeign org.springframework.cloud:spring-cloud-starter-openfeign Calling external microservices Declarative REST clients
Spring Cloud Gateway org.springframework.cloud:spring-cloud-starter-gateway API Gateway Routing, filtering, load balancing
Config Server Client org.springframework.cloud:spring-cloud-starter-config Centralized configuration Externalized configuration management

A Learning Roadmap

If I were learning Spring Boot in order

  1. spring-boot-starter-web
  2. spring-boot-starter-test
  3. spring-boot-starter-validation
  4. spring-boot-starter-data-jpa
  5. spring-boot-starter-security
  6. spring-boot-starter-actuator
  7. spring-boot-starter-cache
  8. Kafka (spring-kafka)
  9. Spring Cloud (Feign, Config, Gateway)
  10. WebFlux

If your goal is becoming productive as a backend Spring Boot developer, mastering the first six starters (web, test, data-jpa, validation, security, actuator) will cover roughly 80–90% of the Spring Boot applications you'll encounter.

No comments:

Post a Comment