Spring Boot Starter
There are number of built-in starters provided by Spring Boot to make the development faster and quick.
Just adding a starter dependency in pom.xml file will make Spring application ready to user. For example, spring-boot-starter-jdbc allows us to easily integrate with database.
All built-in starters provided by Spring are having similar naming convention starting with spring-boot-starter-*, where * denotes to starter type. e.g. spring-boot-starter-web starter to create Spring MVC application.
Custom Starter
There are some third party starters are also avaialble and if require we can also create custom starters. Custom starter follows <project_name>-spring-boot-starter as the naming convention.
For example, if we created a project named as practice, the starter name for this project will be practice-spring-boot-starter
There are multiple advantages to use Spring Boot Starter:
- It will increase developers productivity and deliver functionality in less time.
- There is no headache to match starter dependency version in pom.xml file.
- This is tested code which is easy to plugin and ready to use.
There are multiple built-in and custom Spring Boot Starters are readily available to use and all belongs to org.springframework.boot group.
There are three types of starters available:
- Application Starter
- Technical Starter
- Production Starter
Lets discuss all the types of starters in detail:
Application Starters
- spring-boot-starter-web starter will help us to create web RESTful applications.
- spring-boot-starter-jdbc starter will help us to make a connection pool.
- spring-boot-starter-test starter will help in unit and integration Testing.
- spring-boot-starter-web-services starter is all about to create web services.
- spring-boot-starter-data-jpa starter will help us to integrate with database using Hibernate JPA.
- spring-boot-starter-hateoas starter will add features related to HATEOAS.
- spring-boot-starter-security starter is all about and security.
- spring-boot-starter-cache starter to enable caching support.
Technical Starters
spring-boot-starter-logging is a default logging provided by Spring boot application starter.
spring-boot-starter-log4j2 starter is also for Log4j2 logging and an alternate option of spring-boot-starter-logging.
Production starters
Production ready starters are nothing but an actuator helps us to Monitor application, traffic, health check-up, information related to caching. Actuators can be access via JMX or HTTP.
spring-boot-starter-actuator starter to monitor application, traffic, health check-up, information related to caching.
Imran Khan, Adobe Community Advisor, AEM certified developer and Java Geek, is an experienced AEM developer with over 11 years of expertise in designing and implementing robust web applications. He leverages Adobe Experience Manager, Analytics, and Target to create dynamic digital experiences. Imran possesses extensive expertise in J2EE, Sightly, Struts 2.0, Spring, Hibernate, JPA, React, HTML, jQuery, and JavaScript.