说明
Spring Boot Reference Documentation
starter是一组方便的依赖描述符,你可以在你的应用中包含进来。使用starter,你可以一站式获得你所需要的spring和相关技术,而无需搜索示例代码和复制粘贴大量的依赖描述符。例如,如果您想开始使用Spring和JPA进行数据库访问,在你的项目中包含spring-boot-starter-data-jpa依赖。
starter包含许多依赖项,这些依赖项可以帮助你快速启动和运行项目,并具有一致的管理传递依赖。
官方的starter遵循一个命名模式:spring-boot-starter-*,其中*
表示一个特别类型的应用。这种命名结构可以帮助你快速发现一个starter。例如,在eclipse中编辑POM,输入spring-boot-starter,就可以提示完整的starter列表:
第三方的starter不能以spring-boot开头,而通常以项目的名字开头。例如,一个第三方starter项目的名字是thirdpartyproject,
那么该starter命名为thirdpartyproject-spring-boot-starter。
starter列表
下表是Spring Boot提供的在org.springframework.boot组下的starter列表:
Name | Description |
---|---|
Core starter, including auto-configuration support, logging and YAML | |
Starter for JMS messaging using Apache ActiveMQ | |
Starter for using Spring AMQP and Rabbit MQ | |
Starter for aspect-oriented programming with Spring AOP and AspectJ | |
Starter for JMS messaging using Apache Artemis | |
Starter for using Spring Batch | |
Starter for using Spring Framework’s caching support | |
Starter for using Cassandra distributed database and Spring Data Cassandra | |
Starter for using Cassandra distributed database and Spring Data Cassandra Reactive | |
Starter for using Couchbase document-oriented database and Spring Data Couchbase | |
Starter for using Couchbase document-oriented database and Spring Data Couchbase Reactive | |
Starter for using Elasticsearch search and analytics engine and Spring Data Elasticsearch | |
Starter for using Spring Data JDBC | |
Starter for using Spring Data JPA with Hibernate | |
Starter for using Spring Data LDAP | |
Starter for using MongoDB document-oriented database and Spring Data MongoDB | |
Starter for using MongoDB document-oriented database and Spring Data MongoDB Reactive | |
Starter for using Neo4j graph database and Spring Data Neo4j | |
Starter for using Spring Data R2DBC | |
Starter for using Redis key-value data store with Spring Data Redis and the Lettuce client | |
Starter for using Redis key-value data store with Spring Data Redis reactive and the Lettuce client | |
Starter for exposing Spring Data repositories over REST using Spring Data REST and Spring MVC | |
Starter for building MVC web applications using FreeMarker views | |
Starter for building GraphQL applications with Spring GraphQL | |
Starter for building MVC web applications using Groovy Templates views | |
Starter for building hypermedia-based RESTful web application with Spring MVC and Spring HATEOAS | |
Starter for using Spring Integration | |
Starter for using JDBC with the HikariCP connection pool | |
Starter for building RESTful web applications using JAX-RS and Jersey. An alternative to spring-boot-starter-web | |
Starter for using jOOQ to access SQL databases with JDBC. An alternative to spring-boot-starter-data-jpa or spring-boot-starter-jdbc | |
Starter for reading and writing json | |
Starter for using Java Mail and Spring Framework’s email sending support | |
Starter for building web applications using Mustache views | |
Starter for using Spring Authorization Server features | |
Starter for using Spring Security’s OAuth2/OpenID Connect client features | |
Starter for using Spring Security’s OAuth2 resource server features | |
Starter for using Spring for Apache Pulsar | |
Starter for using Spring for Apache Pulsar Reactive | |
Starter for using the Quartz scheduler | |
Starter for building RSocket clients and servers | |
Starter for using Spring Security | |
Starter for testing Spring Boot applications with libraries including JUnit Jupiter, Hamcrest and Mockito | |
Starter for building MVC web applications using Thymeleaf views | |
Starter for using Java Bean Validation with Hibernate Validator | |
Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container | |
Starter for using Spring Web Services | |
Starter for building WebFlux applications using Spring Framework’s Reactive Web support | |
Starter for building WebSocket applications using Spring Framework’s MVC WebSocket support |
除了应用程序starter,以下starter可以提供产品就绪特性:
Name | Description |
---|---|
Starter for using Spring Boot’s Actuator which provides production ready features to help you monitor and manage your application |
Spring Boot还包含以下starter,如果你想排除或替换特定的技术部件,可以使用这些启动器:
Name | Description |
---|---|
Starter for using Jetty as the embedded servlet container. An alternative to spring-boot-starter-tomcat | |
Starter for using Log4j2 for logging. An alternative to spring-boot-starter-logging | |
Starter for logging using Logback. Default logging starter | |
Starter for using Reactor Netty as the embedded reactive HTTP server. | |
Starter for using Tomcat as the embedded servlet container. Default servlet container starter used by spring-boot-starter-web | |
Starter for using Undertow as the embedded servlet container. An alternative to spring-boot-starter-tomcat |