Spring Boot【有与无】【参考】Spring Boot Starters

博客介绍了Spring Boot的不同类型starters。除应用启动器外,还有可添加生产就绪功能的生产启动器,以及用于剔除或替换特定技术方面的技术启动器,如剔除logging使用log4j。

参考

Table 1. Spring Boot application starters
NameDescriptionPom

spring-boot-starter

Core starter, including auto-configuration support, logging and YAML

Pom

spring-boot-starter-activemq

Starter for JMS messaging using Apache ActiveMQ

Pom

spring-boot-starter-amqp

Starter for using Spring AMQP and Rabbit MQ

Pom

spring-boot-starter-aop

Starter for aspect-oriented programming with Spring AOP and AspectJ

Pom

spring-boot-starter-artemis

Starter for JMS messaging using Apache Artemis

Pom

spring-boot-starter-batch

Starter for using Spring Batch

Pom

spring-boot-starter-cache

Starter for using Spring Framework’s caching support

Pom

spring-boot-starter-cloud-connectors

Starter for using Spring Cloud Connectors which simplifies connecting to services in cloud platforms like Cloud Foundry and Heroku

Pom

spring-boot-starter-data-cassandra

Starter for using Cassandra distributed database and Spring Data Cassandra

Pom

spring-boot-starter-data-cassandra-reactive

Starter for using Cassandra distributed database and Spring Data Cassandra Reactive

Pom

spring-boot-starter-data-couchbase

Starter for using Couchbase document-oriented database and Spring Data Couchbase

Pom

spring-boot-starter-data-couchbase-reactive

Starter for using Couchbase document-oriented database and Spring Data Couchbase Reactive

Pom

spring-boot-starter-data-elasticsearch

Starter for using Elasticsearch search and analytics engine and Spring Data Elasticsearch

Pom

spring-boot-starter-data-jdbc

Starter for using Spring Data JDBC

Pom

spring-boot-starter-data-jpa

Starter for using Spring Data JPA with Hibernate

Pom

spring-boot-starter-data-ldap

Starter for using Spring Data LDAP

Pom

spring-boot-starter-data-mongodb

Starter for using MongoDB document-oriented database and Spring Data MongoDB

Pom

spring-boot-starter-data-mongodb-reactive

Starter for using MongoDB document-oriented database and Spring Data MongoDB Reactive

Pom

spring-boot-starter-data-neo4j

Starter for using Neo4j graph database and Spring Data Neo4j

Pom

spring-boot-starter-data-redis

Starter for using Redis key-value data store with Spring Data Redis and the Lettuce client

Pom

spring-boot-starter-data-redis-reactive

Starter for using Redis key-value data store with Spring Data Redis reactive and the Lettuce client

Pom

spring-boot-starter-data-rest

Starter for exposing Spring Data repositories over REST using Spring Data REST

Pom

spring-boot-starter-data-solr

Starter for using the Apache Solr search platform with Spring Data Solr

Pom

spring-boot-starter-freemarker

Starter for building MVC web applications using FreeMarker views

Pom

spring-boot-starter-groovy-templates

Starter for building MVC web applications using Groovy Templates views

Pom

spring-boot-starter-hateoas

Starter for building hypermedia-based RESTful web application with Spring MVC and Spring HATEOAS

Pom

spring-boot-starter-integration

Starter for using Spring Integration

Pom

spring-boot-starter-jdbc

Starter for using JDBC with the HikariCP connection pool

Pom

spring-boot-starter-jersey

Starter for building RESTful web applications using JAX-RS and Jersey. An alternative to spring-boot-starter-web

Pom

spring-boot-starter-jooq

Starter for using jOOQ to access SQL databases. An alternative to spring-boot-starter-data-jpa or spring-boot-starter-jdbc

Pom

spring-boot-starter-json

Starter for reading and writing json

Pom

spring-boot-starter-jta-atomikos

Starter for JTA transactions using Atomikos

Pom

spring-boot-starter-jta-bitronix

Starter for JTA transactions using Bitronix

Pom

spring-boot-starter-mail

Starter for using Java Mail and Spring Framework’s email sending support

Pom

spring-boot-starter-mustache

Starter for building web applications using Mustache views

Pom

spring-boot-starter-oauth2-client

Starter for using Spring Security’s OAuth2/OpenID Connect client features

Pom

spring-boot-starter-oauth2-resource-server

Starter for using Spring Security’s OAuth2 resource server features

Pom

spring-boot-starter-quartz

Starter for using the Quartz scheduler

Pom

spring-boot-starter-rsocket

Starter for building RSocket clients and servers.

Pom

spring-boot-starter-security

Starter for using Spring Security

Pom

spring-boot-starter-test

Starter for testing Spring Boot applications with libraries including JUnit, Hamcrest and Mockito

Pom

spring-boot-starter-thymeleaf

Starter for building MVC web applications using Thymeleaf views

Pom

spring-boot-starter-validation

Starter for using Java Bean Validation with Hibernate Validator

Pom

spring-boot-starter-web

Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container

Pom

spring-boot-starter-web-services

Starter for using Spring Web Services

Pom

spring-boot-starter-webflux

Starter for building WebFlux applications using Spring Framework’s Reactive Web support

Pom

spring-boot-starter-websocket

Starter for building WebSocket applications using Spring Framework’s WebSocket support

Pom

In addition to the application starters, the following starters can be used to add production ready features:

Table 2. Spring Boot production starters
NameDescriptionPom

spring-boot-starter-actuator

Starter for using Spring Boot’s Actuator which provides production ready features to help you monitor and manage your application

Pom

Finally, Spring Boot also includes the following starters that can be used if you want to exclude or swap specific technical facets:

Table 3. Spring Boot technical starters
NameDescriptionPom

spring-boot-starter-jetty

Starter for using Jetty as the embedded servlet container. An alternative to spring-boot-starter-tomcat

Pom

spring-boot-starter-log4j2

Starter for using Log4j2 for logging. An alternative to spring-boot-starter-logging

Pom

spring-boot-starter-logging

Starter for logging using Logback. Default logging starter

Pom

spring-boot-starter-reactor-netty

Starter for using Reactor Netty as the embedded reactive HTTP server.

Pom

spring-boot-starter-tomcat

Starter for using Tomcat as the embedded servlet container. Default servlet container starter used by spring-boot-starter-web

Pom

spring-boot-starter-undertow

Starter for using Undertow as the embedded servlet container. An alternative to spring-boot-starter-tomcat

Pom

 

Spring Boot application starters

NameDescription备注
spring-boot-starter-thymeleaf使MVC Web applications 支持ThymeleafThymeleaf是一个JAVA库,一个XML/XHTML/HTML5的可扩展的模板引擎,同类事物:Jsp
spring-boot-starter-data-couchbase使用Couchbase 文件存储数据库、Spring Data CouchbaseSpring Data是一个用于简化数据库访问,并支持云服务的开源框架
spring-boot-starter-artemis为JMS messaging使用Apache ArtemisJMS是Java消息服务;HornetQ代码库捐献给 Apache ActiveMQ 社区,它现在成为ActiveMQ旗下的一个子项目,名为 “Artemis”
spring-boot-starter-web-services使用Spring Web ServicesSpring Web Services是基于Spring框架的Web服务框架,主要侧重于基于文档驱动的Web服务,提供SOAP服务开发,允许通过多种方式创建 Web 服务。
spring-boot-starter-mail使用Java Mail、Spring email发送支持Java Mail、Spring email为邮件发送工具
spring-boot-starter-data-redis通过Spring Data Redis 、Jedis client使用Redis键值存储数据库Jedis 是 Redis 官方首选的 Java 客户端开发包
spring-boot-starter-web构建Web,包含RESTful风格框架SpringMVC和默认的嵌入式容器TomcatRESTful是一种软件架构风格,设计风格而不是标准,只是提供了一组设计原则和约束条件
spring-boot-starter-activemq为JMS使用Apache ActiveMQActiveMQ 是Apache出品,最流行的,能力强劲的开源消息总线
spring-boot-starter-data-elasticsearch使用Elasticsearch、analytics engine、Spring Data ElasticsearchElasticSearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口
spring-boot-starter-integration使用Spring IntegrationSpring Integration是Spring框架创建的一个API,面向企业应用集成(EAI)
spring-boot-starter-test测试 Spring Boot applications包含JUnit、 Hamcrest、MockitoJUnit、 Hamcrest、Mockito为测试框架
spring-boot-starter-jdbc通过 Tomcat JDBC 连接池使用JDBC 
spring-boot-starter-mobile通过Spring Mobile构建Web应用Spring Mobile 是 Spring MVC 的扩展,用来简化手机上的Web应用开发
spring-boot-starter-validation通过Hibernate Validator使用 Java Bean ValidationBean Validation 是一个数据验证的规范;Hibernate Validator是一个数据验证框架
spring-boot-starter-hateoas使用Spring MVC、Spring HATEOAS构建 hypermedia-based RESTful Web 应用hypermedia-based似乎是专业术语,博主表示不会翻译;Spring HATEOAS 是一个用于支持实现超文本驱动的 REST Web 服务的开发库
spring-boot-starter-jersey通过 JAX-RS、Jersey构建 RESTful web applications;spring-boot-starter-web的另一替代方案JAX-RS是JAVA EE6 引入的一个新技术;Jersey不仅仅是一个JAX-RS的参考实现,Jersey提供自己的API,其API继承自JAX-RS,提供更多的特性和功能以进一步简化RESTful service和客户端的开发
spring-boot-starter-data-neo4j使用Neo4j图形数据库、Spring Data Neo4jNeo4j是一个高性能的,NOSQL图形数据库,它将结构化数据存储在网络上而不是表中
spring-boot-starter-websocket使用Spring WebSocket构建 WebSocket 应用Websocket是一个持久化的协议,相对于HTTP这种非持久的协议来说
spring-boot-starter-aop通过Spring AOP、AspectJ面向切面编程AspectJ是一个面向切面的框架,它扩展了Java语言
spring-boot-starter-amqp使用Spring AMQP、Rabbit MQSpring AMQP 是基于 Spring 框架的 AMQP 消息解决方案,提供模板化的发送和接收消息的抽象层,提供基于消息驱动的 POJO;RabbitMQ是一个在AMQP基础上完整的,可复用的企业消息系统
spring-boot-starter-data-cassandra使用Cassandra分布式数据库、Spring Data CassandraApache Cassandra是一套开源分布式NoSQL数据库系统
spring-boot-starter-social-facebook使用 Spring Social FacebookFacebook提供用户使用第三方社交网络的账号API,同类事物:QQ第三方登录接口
spring-boot-starter-jta-atomikos为 JTA 使用 AtomikosJTA,即Java Transaction API,JTA允许应用程序执行分布式事务处理;Atomikos 是一个为Java平台提供增值服务的并且开源类事务管理
spring-boot-starter-security使用 Spring SecuritySpring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架
spring-boot-starter-mustache使MVC Web applications 支持MustacheMustache是基于JavaScript实现的模版引擎,类似于jQuery Template,但是这个模版更加的轻量级,语法更加的简单易用,很容易上手
spring-boot-starter-data-jpa通过 Hibernate 使用 Spring Data JPA (Spring-data-jpa依赖于Hibernate)JPA全称Java Persistence API.JPA通过JDK 5.0注解或XML描述对象-关系表的映射关系,并将运行期的实体对象持久化到数据库中
spring-boot-starterCore starter,包括 自动配置支持、 logging and YAMLlogging是指的Starter的专有框架;YAML是“另一种标记语言”的外语缩写,它参考了其他多种语言,包括:XML、C语言、Python、Perl以及电子邮件格式RFC2822
spring-boot-starter-groovy-templates使MVC Web applications 支持Groovy TemplatesGroovy Templates是模视图模板,同类事物:Jsp
spring-boot-starter-freemarker使MVC Web applications 支持 FreeMarkerFreeMarker是模视图模板,同类事物:Jsp
spring-boot-starter-batch使用Spring BatchSpring Batch是一个轻量级的,完全面向Spring的批处理框架,可以应用于企业级大量的数据处理系统
spring-boot-starter-social-linkedin使用Spring Social LinkedInLinkedIn提供用户使用第三方社交网络的账号API,同类事物:QQ第三方登录接口
spring-boot-starter-cache使用 Spring caching 支持Spring caching是Spring的提供的缓存框架
spring-boot-starter-data-solr通过 Spring Data Solr 使用 Apache SolrApache Solr 是一个开源的搜索服务器。Solr 使用 Java 语言开发,主要基于 HTTP 和 Apache Lucene 实现
spring-boot-starter-data-mongodb使用 MongoDB 文件存储数据库、Spring Data MongoDBSpring Data是一个用于简化数据库访问,并支持云服务的开源框架
spring-boot-starter-jooq使用JOOQ链接SQL数据库;spring-boot-starter-data-jpa、spring-boot-starter-jdbc的另一替代方案jOOQ(Java Object Oriented Querying,即面向Java对象查询)是一个高效地合并了复杂SQL、类型安全、源码生成、ActiveRecord、存储过程以及高级数据类型的Java API的类库。
spring-boot-starter-jta-narayanaSpring Boot Narayana JTA Starter似乎和jboss.narayana.jta有关
spring-boot-starter-cloud-connectors用连接简化的 Spring Cloud 连接器进行云服务就像Cloud Foundry、Heroku那样Cloud Foundry是VMware推出的业界第一个开源PaaS云平台;Heroku是一个支持多种编程语言的云平台即服务
spring-boot-starter-jta-bitronix为JTA transactions 使用 BitronixBitronix Transaction Manager (BTM) 是一个简单但完整实现了 JTA 1.1 API 的类库,完全支持 XA 事务管理器,提供 JTA API 所需的所有服务,并让代码保持简洁
spring-boot-starter-social-twitter使用 Spring Social TwitterTwitter提供用户使用第三方社交网络的账号API,同类事物:QQ第三方登录接口
spring-boot-starter-data-rest使用Spring Data REST 以 REST 方式暴露 Spring Data repositoriesexposing Spring Data repositories over REST using Spring Data REST

 

Spring Boot production starters

下列 starters 可用于添加 production ready 功能

NameDescription备注
spring-boot-starter-actuator使用Spring Boot Actuator 的 production-ready 功能来帮助你监视和管理应用 

 

Spring Boot technical starters

最后, Spring Boot 还包括一些 starters ,如果你想剔除或替换某些专门的功能,你可以使用这些 starters :

NameDescription备注
spring-boot-starter-undertow使用 Undertow 作为嵌入式服务容器;spring-boot-starter-tomcat的另一替代方案Undertow是JBoss开源组织旗下一款Web服务器的名称
spring-boot-starter-jetty使用 Jetty 作为嵌入式服务容器;spring-boot-starter-tomcat的另一替代方案Jetty 是开源 Java 应用服务器,有篇英语新闻译文称“Webtide —— Jetty背后的公司”
spring-boot-starter-logging为 logging 使用Logback.默认 logging starterLogback是由log4j创始人设计的又一个开源日志组件
spring-boot-starter-tomcat使用 Tomcat 作为嵌入式服务容器;作为默认嵌入式服务容器被spring-boot-starter-web使用 
spring-boot-starter-log4j2使用Log4j2记录日志;spring-boot-starter-logging的另一替代方案 

剔除logging使用log4j

<dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
            <!-- 剔除logging -->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- 添加Log4j -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j2</artifactId>
        </dependency>
</dependencies>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

琴 韵

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值