Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Last Updated: Mar 27, 2024

Spring Boot Starters

Leveraging ChatGPT - GenAI as a Microsoft Data Expert
Speaker
Prerita Agarwal
Data Specialist @
23 Jul, 2024 @ 01:30 PM

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 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.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

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.

Name Description
spring-boot-starter This starter is the core starter which includes auto-configuration support, YAML and logging
spring-boot-starter-activemq This starter is used in JMS (Java Message Service) messaging using Apache ActiveMQ.
spring-boot-starter-aop This Starter is for aspect-oriented programming with Spring AOP(Aspect Oriented Programming) and AspectJ.
spring-boot-starter-batch This Starter is for using Spring Batch.
spring-boot-starter-cache This Starter is for using caching support of Spring Framework.
spring-boot-starter-cloud-connectors This starter is used for Spring Cloud Connectors, which simplifies connecting to cloud platforms like Heroku.
spring-boot-starter-data-elasticsearch This Starter uses Elasticsearch search and Spring Data Elasticsearch and analytics engine.
spring-boot-starter-data-jpa This Starter is for using Spring Data JPA (Java Persistent API) with Hibernate
spring-boot-starter-data-ldap This Starter uses Spring Data LDAP (Lightweight Directory Access Protocol).
spring-boot-starter-data-mongodb This Starter is used for MongoDB database and Spring Data MongoDB.
spring-boot-starter-data-redis This Starter is used for Redis key-value data store with Lettuce client and the Spring Data Redis.
spring-boot-starter-data-rest This Starter is used for exposing Spring Data repositories over REST using Spring Data REST
spring-boot-starter-freemarker This Starter is used for building MVC (Model-View-Controller) web applications using the FreeMarker views
spring-boot-starter-groovy-templates This Starter is used for building the MVC web applications using Groovy Template views.
spring-boot-starter-hateoas This Starter is used for building hypermedia-based RESTful web applications with Spring HATEOAS and Spring MVC 
spring-boot-starter-integration This Starter is used for Spring Integration
spring-boot-starter-jdbc This Starter is used for JDBC with the Tomcat JDBC connection pool
spring-boot-starter-jersey This 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-atomikos This starter is used for JTA (Java Transaction API) transactions using Atomikos.
spring-boot-starter-jta-bitronix This starter is used for JTA (Java Transaction API) transactions using Bitronix.
spring-boot-starter-json This Starter is used for reading and writing JSON (JavaScript Object Notation).
spring-boot-starter-mail This Starter is used for Spring Framework’s email sending support and Java mail.
spring-boot-starter-mustache This starter is used for building MVC web applications using Mustache views.
spring-boot-starter-quartz This Starter is used for the Quartz scheduler.
spring-boot-starter-security This Starter is used for Spring Security.
spring-boot-starter-social-facebook This starter is used for Spring Social Facebook.
spring-boot-starter-social-LinkedIn This starter is used for Spring Social LinkedIn.
spring-boot-starter-social-twitter This starter is used for Spring Social Twitter.
spring-boot-starter-test This Starter is used for testing Spring Boot applications with libraries including Hamcrest, JUnit and Mockito.
spring-boot-starter-thymeleaf This Starter is used for building MVC web applications using Thymeleaf views.
spring-boot-starter-validation This Starter is used for Java Bean Validation with Hibernate Validator.
spring-boot-starter-web This 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-services This Starter is used for Spring Web Services.
spring-boot-starter-websocket This 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.

Name Description
spring-boot-starter-actuator This 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.

Name Description
spring-boot-starter-undertow This starter is used for Undertow as the embedded servlet container. It is an alternative for the spring-boot-starter-tomcat.
spring-boot-starter-jetty This starter is used for Jetty as the embedded servlet container. It is an alternative for the spring-boot-starter-tomcat.
spring-boot-starter-logging This starter is used for logging using Logback.
spring-boot-starter-log4j2 This starter is used for Log4j2 for logging. It is an alternative for the spring-boot-starter-logging.
spring-boot-starter-tomcat This starter is used for Tomcat as the embedded servlet container.

 

Third-Party Starters

In Spring Boot, we can also include third-party starters for any extra feature. We can consist of these third-party starters in our project in the pom.xml file with the naming convention as abc-spring-boot-starter-*, where the abc is the third-party project name and the denotes a particular type of application.

Must Read Spring MVC Flow and Spring Tool Suite.

FAQs

  1. 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.
     
  2. 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.

Key Takeaways

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. You can also consider our Spring Boot Course to give your career an edge over others.

We hope you found this blog helpful. Liked the blog? Then feel free to upvote and share it.

Topics covered
1.
Introduction
2.
Spring Boot Starters
3.
Popular Spring Boot Starters
4.
Spring Boot Starters for Production
5.
Spring Boot Technical Starters
6.
Third-Party Starters
7.
FAQs
8.
Key Takeaways