Spring Boot Starters

January 04, 2020 No comments Spring Boot Application Starters

1. What is a Spring Boot Starter

Starters are an official Spring Boot dependency descriptors created to facilitate extending the application with new functionalities. For example, if you want to integrate your Spring application with a non-relational database - MongoDB, simply include the spring-boot-starter-data-mongodb dependency in your project, and you are good to go.

2. Type of starters

There are three types of official starters available for Spring Boot projects:

2.1 Spring Boot application starters

  • spring-boot-starter - Core starter, including auto-configuration support, logging and YAML Starter,
  • spring-boot-starter-activemq - JMS messaging using Apache ActiveMQ Starter,
  • spring-boot-starter-amqp - Spring AMQP and Rabbit MQ Starter,
  • spring-boot-starter-aop - aspect-oriented programming with Spring AOP and AspectJ Starter,
  • spring-boot-starter-artemis - JMS messaging using Apache Artemis Starter,
  • spring-boot-starter-batch - Spring Batch Starter,
  • spring-boot-starter-cache - Spring Framework’s caching support Starter,
  • spring-boot-starter-cloud-connectors - Spring Cloud Connectors which simplifies connecting to services in cloud platforms like Cloud Foundry and Heroku Starter,
  • spring-boot-starter-data-cassandra - Cassandra distributed database and Spring Data Cassandra Starter,
  • spring-boot-starter-data-cassandra-reactive - Cassandra distributed database and Spring Data Cassandra Reactive Starter,
  • spring-boot-starter-data-couchbase - Couchbase document-oriented database and Spring Data Couchbase Starter,
  • spring-boot-starter-data-couchbase-reactive - Couchbase document-oriented database and Spring Data Couchbase Reactive Starter,
  • spring-boot-starter-data-elasticsearch - Elasticsearch search and analytics engine and Spring Data Elasticsearch Starter,
  • spring-boot-starter-data-jdbc - Spring Data JDBC Starter,
  • spring-boot-starter-data-jpa - Spring Data JPA with Hibernate Starter,
  • spring-boot-starter-data-ldap - Spring Data LDAP Starter,
  • spring-boot-starter-data-mongodb - MongoDB document-oriented database and Spring Data MongoDB Starter,
  • spring-boot-starter-data-mongodb-reactive - MongoDB document-oriented database and Spring Data MongoDB Reactive Starter,
  • spring-boot-starter-data-neo4j - Neo4j graph database and Spring Data Neo4j Starter,
  • spring-boot-starter-data-redis - Redis key-value data store with Spring Data Redis and the Lettuce client Starter,
  • spring-boot-starter-data-redis-reactive - Redis key-value data store with Spring Data Redis reactive and the Lettuce client Starter,
  • spring-boot-starter-data-rest - exposing Spring Data repositories over REST using Spring Data REST Starter,
  • spring-boot-starter-data-solr - the Apache Solr search platform with Spring Data Solr Starter,
  • spring-boot-starter-freemarker - building MVC web applications using FreeMarker views Starter,
  • spring-boot-starter-groovy-templates - building MVC web applications using Groovy Templates views Starter,
  • spring-boot-starter-hateoas - building hypermedia-based RESTful web application with Spring MVC and Spring HATEOAS Starter,
  • spring-boot-starter-integration - Spring Integration Starter,
  • spring-boot-starter-jdbc - JDBC with the HikariCP connection pool Starter,
  • spring-boot-starter-jersey - building RESTful web applications using JAX-RS and Jersey. An alternative to spring-boot-starter-web Starter,
  • spring-boot-starter-jooq - jOOQ to access SQL databases. An alternative to spring-boot-starter-data-jpa or spring-boot-starter-jdbc Starter,
  • spring-boot-starter-json - reading and writing json Starter,
  • spring-boot-starter-jta-atomikos - JTA transactions using Atomikos Starter,
  • spring-boot-starter-jta-bitronix - JTA transactions using Bitronix Starter,
  • spring-boot-starter-mail - Java Mail and Spring Framework’s email sending support Starter,
  • spring-boot-starter-mustache - building web applications using Mustache views Starter,
  • spring-boot-starter-oauth2-client - Spring Security’s OAuth2/OpenID Connect client features Starter,
  • spring-boot-starter-oauth2-resource-server - Spring Security’s OAuth2 resource server features Starter,
  • spring-boot-starter-quartz - the Quartz scheduler Starter,
  • spring-boot-starter-security - Spring Security Starter,
  • spring-boot-starter-test - testing Spring Boot applications with libraries including JUnit, Hamcrest and Mockito Starter,
  • spring-boot-starter-thymeleaf - building MVC web applications using Thymeleaf views Starter,
  • spring-boot-starter-validation - Java Bean Validation with Hibernate Validator Starter,
  • spring-boot-starter-web - building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container Starter,
  • spring-boot-starter-web-services - Spring Web Services Starter,
  • spring-boot-starter-webflux - building WebFlux applications using Spring Framework’s Reactive Web support Starter,
  • spring-boot-starter-websocket - building WebSocket applications using Spring Framework’s WebSocket support Starter.

2.2 Spring Boot production starters

  • spring-boot-starter-actuator - provides production ready features to help you monitor and manage your Spring Boot application.

2.3 Spring Boot technical starters

  • spring-boot-starter-jetty - Starter for using Jetty as the embedded servlet container,
  • spring-boot-starter-log4j2 - Starter for using Log4j2 for logging,
  • spring-boot-starter-logging - Starter for logging using Logback,
  • spring-boot-starter-reactor-netty - Starter for using Reactor Netty as the embedded reactive HTTP server,
  • spring-boot-starter-tomcat - Starter for using Tomcat as the embedded servlet container,
  • spring-boot-starter-undertow - Starter for using Undertow as the embedded servlet container.

Spring Boot supports three embedded servlet containers: Tomcat, Jetty and Undertow. Tomcat is set as default sevlet container. To change that simply add other alternative starter into your configuration: spring-boot-starter-jetty or spring-boot-starter-undertow.

The same steps you have to make if you want to change default logging library, which is Logback, add alternative dependency into your pom.xml: for example spring-boot-starter-log4j2.

3. Adding Spring Boot Starters in IntelliJ

IntelliJ automatically search for Spring Boot starters. Just go to your main pom.xml file, add new dependency and start typing: spring-boot-starter*;

Auto search spring boot starters in intelij

{{ message }}

{{ 'Comments are closed.' | trans }}