Table of contents
1.
Introduction
2.
Spring Boot Starters
3.
Popular Spring Boot Starters
4.
Spring Boot Starters for Production
5.
Spring Boot Technical Starters
6.
Advantages of Spring Boot Starters
7.
Third-Party Starters for Spring Boot
8.
Frequently Asked Questions
8.1.
What is a Spring Boot?
8.2.
What are the main benefits of Spring Boot Starters?
9.
Conclusion
Last Updated: Nov 18, 2024

Spring Boot Starters

Author Tanay kumar Deo
2 upvotes
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Dependency management is one of the critical aspects of any project. And managing this manually is less than ideal; the more time we spend on it, the less time we have on the crucial aspects of the project.

Spring Boot Starters

Spring Boot provides us with several Spring Boot Starters to address this problem. The built-in Spring Boot starters make the development very rapid and easy. They are a set of convenient dependency descriptors that we can use to bootstrap our spring applications. Spring boot starters contain a lot of pre-defined dependencies with a supported set of transitive dependencies.

We have more than 30 Spring Boot starters available. Let's see some of them in this article.

Also See, spring mvc vs spring boot

Spring Boot Starters

Spring Boot starters are a set of convenient dependency descriptors that we can use to bootstrap our spring applications. It contains a lot of pre-defined dependencies with a supported set of transitive dependencies.

We have a naming pattern for the starters in the Spring Boot: spring-boot-starter-*, where the * denotes a particular type of application. For reference, if we want to use Spring Web Services, we need to include the spring-boot-starter-web-services dependency in the pom.xml file of our project.

You can also consider our Spring Boot Course to give your career an edge over others.

Popular Spring Boot Starters

In this section, we will discuss the popular spring boot starters with a quick brief about all of them. Spring boot offers more than 30 starters to make our work easy and quick.

NameDescription
spring-boot-starterThis starter is the core starter which includes auto-configuration support, YAML and logging
spring-boot-starter-activemqThis starter is used in JMS (Java Message Service) messaging using Apache ActiveMQ.
spring-boot-starter-aopThis Starter is for aspect-oriented programming with Spring AOP(Aspect Oriented Programming) and AspectJ.
spring-boot-starter-batchThis Starter is for using Spring Batch.
spring-boot-starter-cacheThis Starter is for using caching support of Spring Framework.
spring-boot-starter-cloud-connectorsThis starter is used for Spring Cloud Connectors, which simplifies connecting to cloud platforms like Heroku.
spring-boot-starter-data-elasticsearchThis Starter uses Elasticsearch search and Spring Data Elasticsearch and analytics engine.
spring-boot-starter-data-jpaThis Starter is for using Spring Data JPA (Java Persistent API) with Hibernate
spring-boot-starter-data-ldapThis Starter uses Spring Data LDAP (Lightweight Directory Access Protocol).
spring-boot-starter-data-mongodbThis Starter is used for MongoDB database and Spring Data MongoDB.
spring-boot-starter-data-redisThis Starter is used for Redis key-value data store with Lettuce client and the Spring Data Redis.
spring-boot-starter-data-restThis Starter is used for exposing Spring Data repositories over REST using Spring Data REST
spring-boot-starter-freemarkerThis Starter is used for building MVC (Model-View-Controller) web applications using the FreeMarker views
spring-boot-starter-groovy-templatesThis Starter is used for building the MVC web applications using Groovy Template views.
spring-boot-starter-hateoasThis Starter is used for building hypermedia-based RESTful web applications with Spring HATEOAS and Spring MVC 
spring-boot-starter-integrationThis Starter is used for Spring Integration
spring-boot-starter-jdbcThis Starter is used for JDBC with the Tomcat JDBC connection pool
spring-boot-starter-jerseyThis Starter is used for building RESTful web applications using JAX-RS (JAVA API for RESTful Web Services) and Jersey. It is an alternative for spring-boot-starter-web
spring-boot-starter-jta-atomikosThis starter is used for JTA (Java Transaction API) transactions using Atomikos.
spring-boot-starter-jta-bitronixThis starter is used for JTA (Java Transaction API) transactions using Bitronix.
spring-boot-starter-jsonThis Starter is used for reading and writing JSON (JavaScript Object Notation).
spring-boot-starter-mailThis Starter is used for Spring Framework’s email sending support and Java mail.
spring-boot-starter-mustacheThis starter is used for building MVC web applications using Mustache views.
spring-boot-starter-quartzThis Starter is used for the Quartz scheduler.
spring-boot-starter-securityThis Starter is used for Spring Security.
spring-boot-starter-social-facebookThis starter is used for Spring Social Facebook.
spring-boot-starter-social-LinkedInThis starter is used for Spring Social LinkedIn.
spring-boot-starter-social-twitterThis starter is used for Spring Social Twitter.
spring-boot-starter-testThis Starter is used for testing Spring Boot applications with libraries including Hamcrest, JUnit and Mockito.
spring-boot-starter-thymeleafThis Starter is used for building MVC web applications using Thymeleaf views.
spring-boot-starter-validationThis Starter is used for Java Bean Validation with Hibernate Validator.
spring-boot-starter-webThis Starter is used for building web, which includes RESTful applications using Spring MVC. It uses Tomcat as the default embedded container.
spring-boot-starter-web-servicesThis Starter is used for Spring Web Services.
spring-boot-starter-websocketThis Starter is used for building WebSocket applications. It uses WebSocket support of Spring Framework.

 

Spring Boot Starters for Production

This section will discuss the available spring boot starters for service after the production of the application.

NameDescription
spring-boot-starter-actuatorThis starter is used for Spring Boot's Actuator, providing production-ready features to help us monitor and manage our application.
spring-boot-starter-remote-shell

This starter is used for the CRaSH remote shell to monitor and manage our application over SSH (Secure Socket Shell). 

Note: Deprecated since v-1.5.

 

Spring Boot Technical Starters

In this section, we will learn the starters related to logging and tomcat.

NameDescription
spring-boot-starter-undertowThis starter is used for Undertow as the embedded servlet container. It is an alternative for the spring-boot-starter-tomcat.
spring-boot-starter-jettyThis starter is used for Jetty as the embedded servlet container. It is an alternative for the spring-boot-starter-tomcat.
spring-boot-starter-loggingThis starter is used for logging using Logback.
spring-boot-starter-log4j2This starter is used for Log4j2 for logging. It is an alternative for the spring-boot-starter-logging.
spring-boot-starter-tomcatThis starter is used for Tomcat as the embedded servlet container.

 

Advantages of Spring Boot Starters

  • Simplified Dependency Management: Predefined dependencies reduce the need to manually specify versions and compatible libraries.
  • Rapid Development: Automatically configures commonly used libraries and tools, speeding up the development process.
  • Consistency: Ensures consistent dependency versions, reducing compatibility issues between libraries.
  • Built-in Support for Popular Frameworks: Offers integration with frameworks like JPA, Web, Security, and Test without manual configuration.
  • Reduced Configuration Effort: Eliminates boilerplate configurations for common use cases, such as web development or messaging.
  • Ease of Testing: Starter dependencies include libraries like JUnit and Mockito for seamless testing setup.
  • Customizable: Default configurations can be overridden to suit specific project requirements.
  • Improved Productivity: Developers can focus on business logic instead of managing dependencies or configurations.

Third-Party Starters for Spring Boot

  • Database Starters: com.github.gavlyukovskiy:p6spy-spring-boot-starter: Enables database query logging using P6Spy. com.h2database:h2: Lightweight database starter for development and testing.
  • Message Brokers: org.springframework.boot:spring-boot-starter-amqp: Starter for RabbitMQ integration. io.awspring.cloud:spring-cloud-aws-messaging: Starter for AWS SQS.
  • Logging: net.logstash.logback:logstash-logback-encoder: Provides enhanced logging capabilities and integration with Logstash.
  • Security and Authentication: org.springframework.boot:spring-boot-starter-oauth2-client: Adds OAuth2 support for client applications. com.okta.spring:okta-spring-boot-starter: Simplifies Okta integration for authentication.
  • Monitoring and Metrics: io.micrometer:micrometer-registry-prometheus: Adds support for exporting metrics to Prometheus. org.springframework.boot:spring-boot-starter-actuator: Provides endpoints for monitoring and managing the application.
  • Cloud and Containerization: org.springframework.cloud:spring-cloud-starter-kubernetes: Simplifies Kubernetes integration. org.springframework.cloud:spring-cloud-starter-aws: Starter for Amazon Web Services.
  • Frontend Integration: com.github.eirslett:frontend-maven-plugin: Helps manage frontend dependencies like Node.js and npm in Spring Boot projects.
  • Search Engines: org.springframework.boot:spring-boot-starter-data-elasticsearch: Integrates Elasticsearch for search functionality.
  • Payment Gateways: com.stripe:stripe-java: Simplifies integration with the Stripe payment gateway.

Frequently Asked Questions

What is a Spring Boot?

Spring Boot is a Spring module that extends the Spring framework's Rapid Application Development capabilities. It's used to create stand-alone spring-based applications.

What are the main benefits of Spring Boot Starters?

Spring Boot starters are mainly used to make development very easy and rapid. They make dependency management quick so that we can focus more and more on programming logic for our project.

Conclusion

In this article, we learned about spring boot starters. We discussed the naming convention for spring boot starters and third-party starters. We also discussed the popular spring boot starters with their usage in brief.

Don't stop here. Check out the articles on STS Download, Spring Boot Auto-configuration, Spring Boot AnnotationsSpring Boot Multi-Module ProjectSpring Boot Packaging and Spring Boot CLI

Live masterclass