Spring boot starters

In this tutorial, we are going to see about Spring boot starters. This is part of Spring boot tutorial series.

Dependency management is one of the critical tasks while working on any project. You want to create a new spring project with JPA capabilities. Do you know what dependencies you need to include? You might go to web, copy dependencies from the sample project and use it in the project

Spring boot starters solve the exactly same problem. Starters are a set of convenient dependency descriptors that you can use to bootstrap your spring applications.

Spring boot starters contain a lot of predefined dependencies with supported set of transitive dependencies.


Spring boot starters naming convention

All Spring boot starters follow the same naming convention for easy search.All the starters start with spring-boot-starter-* .

For example:

Name of JPA starter is spring-boot-starter-data-jpa


List of popular Spring boot JPA starter

StarterDescription
spring-boot-starterCore starter, including auto-configuration support, logging and YAML
spring-boot-starter-activemqStarter for JMS messaging using Apache ActiveMQ
spring-boot-starter-aopStarter for aspect-oriented programming with Spring AOP and AspectJ
spring-boot-starter-batchStarter for using Spring Batch
spring-boot-starter-cacheStarter for using Spring Framework’s caching support
spring-boot-starter-data-elasticsearchStarter for using Elasticsearch search and analytics engine and Spring Data Elasticsearch
spring-boot-starter-data-jpaStarter for using Spring Data JPA with Hibernate
spring-boot-starter-data-ldapStarter for using Spring Data LDAP
spring-boot-starter-data-mongodbStarter for using MongoDB document-oriented database and Spring Data MongoDB
spring-boot-starter-data-redisStarter for using Redis key-value data store with Spring Data Redis and the Lettuce client
spring-boot-starter-data-restStarter for exposing Spring Data repositories over REST using Spring Data REST
spring-boot-starter-freemarkerStarter for building MVC web applications using FreeMarker views
spring-boot-starter-hateoasStarter for building hypermedia-based RESTful web application with Spring MVC and Spring HATEOAS
spring-boot-starter-integrationStarter for using Spring Integration
spring-boot-starter-jdbcStarter for using JDBC with the HikariCP connection pool
spring-boot-starter-jerseyStarter for building RESTful web applications using JAX-RS and Jersey. An alternative to spring-boot-starter-web
spring-boot-starter-jsonStarter for reading and writing json
spring-boot-starter-mailStarter for using Java Mail and Spring Framework’s email sending support
spring-boot-starter-quartzStarter for using the Quartz scheduler
spring-boot-starter-securityStarter for using Spring Security
spring-boot-starter-testStarter for testing Spring Boot applications with libraries including JUnit, Hamcrest and Mockito
spring-boot-starter-thymeleafStarter for building MVC web applications using Thymeleaf views
spring-boot-starter-validationStarter for using Java Bean Validation with Hibernate Validator
spring-boot-starter-webStarter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container
spring-boot-starter-web-servicesStarter for using Spring Web Services

Spring boot starters example

Let’s say you want to create a project which supports ActiveMQ operations. You just need to add below POM entry apart from parent pom.

Here is complete pom.xml for Spring boot ActiveMQ project.

If you can refer working example of Spring boot ActiveMQ example.

Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *