Spring Boot 的各種start

新建一個springBoot項目時,你會選擇很多依賴,在項目中的build.gradle中你會看見各種start,例如下邊的代碼:

dependencies {
    compile('org.springframework.boot:spring-boot-starter-actuator')
    compile('org.springframework.boot:spring-boot-starter-aop')
    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('org.springframework.boot:spring-boot-starter-jdbc')
    compile('org.springframework.boot:spring-boot-starter-mail')
    compile('org.springframework.boot:spring-boot-starter-mobile')
    compile('org.springframework.boot:spring-boot-starter-security')
    compile('org.springframework.boot:spring-boot-starter-social-linkedin')
    compile('org.springframework.boot:spring-boot-starter-thymeleaf')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.springframework.boot:spring-boot-starter-web-services')
    runtime('mysql:mysql-connector-java')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}
今天就在這里列舉一下各種start:

spring-boot-starter
Spring Boot核心starter,包含自動配置、日志、yal配置文件支持
spring-boot-starter-actuator
準生產特性、用于監控和管理應用
spring-boot-starter-remote-shell
提供基于ssh協議的監控和管理
spring-boot-starter-amqp
使用spring-rabbitlai zhichi AMQP
spring-boot-starter-aop
使用spring-aop和AspectJ支持面向切面編程
spring-boot-starter-batch
對Spring Batch的支持
spring-boot-starter-cache
對Spring Cache的抽象支持
spring-boot-starter-cloud-connectors
對云平臺(Cloud Foundry、Heroku)提供的服務提供簡化的連接方式
spring-boot-starter-data-elasticsearch
通過spring-data-elasticsearch對Elasticsearch支持
spring-boot-starter-data-gemfire
通過spring-data-gemfire對分布式存儲GemFire的支持
spring-boot-starter-data-jpa
對JPA的支持,包含spring-data-jpa、spring-orm和hibernate
spring-boot-starter-mongodb
通過spring-data-mongodb,對mongodb的支持
spring-boot-starter-rest
通過spring-data-rest-webmvc將Spring Data repository暴露為REST形式服務
spring-boot-starter-solr
通過spring-data-solr對Apache Solr數據檢索的支持
spring-boot-starter-freemarker
對Freemarker模板引擎的支持
spring-boot-starter-groovy-templates
通過spring-hateoas對基于HATEOAS的REST形式網絡服務支持
spring-boot-starter-hornetq
通過HornetQ對JMS的支持
spring-boot-starter-integration
對系統集成框架spring-integration支持
spring-boot-starter-jdbc
對JDBC數據庫的支持
spring-boot-starter-jersey
對Jersery REST形式網絡服務支持
spring-boot-starter-jta-atomikos
通過Atomikos對分布式事務的支持
spring-boot-starter-mail
對javax.mail的支持
spring-boot-starter-mobile
對spring-mobile的支持
spring-boot-starter-mustache
對Mustache模板引擎的支持
spring-boot-starter-redis
對Redis的支持,包含spring-redis
spring-boot-starter-security
對spring-security的支持
spring-boot-starter-social-facebook
對Facebook支持
spring-boot-starter-social-linkedin
對linkedin支持
spring-boot-starter-social-twitter
對Twitter支持
spring-boot-starter-test
對常用測試框架JUnit、Hamcrest和Mockito的支持,包含spring-test模塊
spring-boot-starter-thymeleaf
對Thymeleaf模板引擎的支持,包含于Spring整合的配置
spring-boot-starter-velocity
對Velocity模板引擎的支持
spring-boot-starter-web
對Web項目開發支持,包含Tomcat和Spring MVC
spring-boot-starter-Tomcat
Spring Boot默認Servlet容器
spring-boot-starter-Jetty
使用Jetty作為Servlet容器
spring-boot-starter-undertow
使用Undertow作為Servlet容器
spring-boot-starter-logging
Spring Boot默認日志框架logback
spring-boot-starter-log4j
支持使用Log4J日志框架
spring-boot-starter-websocket
對websocket的支持
spring-boot-starter-ws
對Spring Web Service支持

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容