Spring Boot中Starter是什么
比如我们要在Spring Boot中引入Web MVC的支持时,我们通常会引入这个模块spring-boot-starter-web,而这个模块如果解压包出来会发现里面什么都没有,只定义了一些POM依赖。
经过研究,Starter主要用来简化依赖用的。比如我们之前做MVC时要引入日志组件,那么需要去找到log4j的版本,然后引入,现在有了Starter之后,直接用这个之后,log4j就自动引入了,也不用关心版本这些问题。
部分starters的依赖:
| Starter(Group ID: org.springframework.boot) | 传递依赖于 |
|---|---|
| spring-boot-starter-log4j2 | ■ org.apache.logging.log4j:log4j-slf4j-impl ■ org.apache.logging.log4j:log4j-api ■ org.apache.logging.log4j:log4j-core ■ org.slf4j:jcl-over-slf4j ■ org.slf4j:jul-to-slf4j |
| spring-boot-starter-logging | ■ ch.qos.logback:logback-classic ■ org.slf4j:jcl-over-slf4j ■ org.slf4j:jul-to-slf4j ■ org.slf4j:log4j-over-slf4j |
| spring-boot-starter-mail | ■ org.springframework.boot:spring-boot-starter ■ org.springframework:spring-context ■ org.springframework:spring-context-support ■ com.sun.mail:javax.mail |
| spring-boot-starter-mobile | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■ org.springframework.mobile:spring-mobile-device |
| spring-boot-starter-mustache | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■ com.samskivert:jmustache |
| spring-boot-starter-redis | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.data:spring-data-redis ■ redis.clients:jedis |
| spring-boot-starter-remote-shell | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-actuator ■ org.crashub:crash.cli ■ org.crashub:crash.connectors.ssh (excludes org.codehaus.groovy:groovy-all) ■ org.crashub:crash.connectors.telnet (excludes javax.servlet:servlet-api, log4j :log4j, commons-logging:commons-logging) ■ org.crashub:crash.embed.spring(excludes org.springframework:spring-web, org.codehaus.groovy:groovy-all) ■ org.crashub:crash.plugins.cron (excludes org.codehaus.groovy:groovy-all) ■ org.crashub:crash.plugins.mail (excludes org.codehaus.groovy:groovy-all) ■ org.crashub:crash.shell (excludes org.codehaus.groovy:groovy-all) ■ org.codehaus.groovy:groovy |
| spring-boot-starter-security | ■ org.springframework.boot:spring-boot-starter ■ org.springframework:spring-aop ■org.springframework.security:spring-security-config ■org.springframework.security:spring-security-web |
| spring-boot-starter-social-facebook | ■org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■org.springframework.social:spring-social-config ■ org.springframework.social:spring-social-core ■ org.springframework.social:spring-social-web ■org.springframework.social:spring-social-facebook |
| spring-boot-starter-social-linkedin | ■org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■org.springframework.social:spring-social-config ■ org.springframework.social:spring-social-core ■ org.springframework.social:spring-social-web ■org.springframework.social:spring-social-linkedin |
| spring-boot-starter-social-twitter | ■org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■ org.springframework.social:spring-social-config ■ org.springframework.social:spring-social-core ■org.springframework.social:spring-social-web ■ org.springframework.social:spring-social-twitter |
| spring-boot-starter-test | ■ junit:junit ■ org.mockito:mockito-core ■ org.hamcrest:hamcrest-core ■ org.hamcrest:hamcrest-library ■ org.springframework:spring-core(excludes commons-logging:commons-logging) ■ org.springframework:spring-test |
| spring-boot-starter-thymeleaf | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■ org.thymeleaf:thymeleaf-spring4 ■nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect |
| spring-boot-starter-tomcat | ■ org.apache.tomcat.embed:tomcat-embed-core ■ org.apache.tomcat.embed:tomcat-embed-el ■org.apache.tomcat.embed:tomcat-embed-logging-juli ■org.apache.tomcat.embed:tomcat-embed-websocket |
| spring-boot-starter-undertow | ■ io.undertow:undertow-core ■ io.undertow:undertow-servlet(excludes org.jboss.spec.javax.servlet:jboss-servlet-api_3.1_spec) ■ io.undertow:undertow-websockets-jsr ■ javax.servlet:javax.servlet-api ■ org.glassfish:javax.el |
| spring-boot-starter-validation | ■ org.springframework.boot:spring-boot-starter ■ org.apache.tomcat.embed:tomcat-embed-el ■org.hibernate:hibernate-validator |
| spring-boot-starter-velocity | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■ commons-beanutils:commons-beanutils ■ commons-collections:commons-collections ■ commons-digester:commons-digester ■ org.apache.velocity:velocity ■ org.apache.velocity:velocity-tools ■ org.springframework:spring-context-support |
| spring-boot-starter-web | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-tomcat ■ org.springframework.boot:spring-boot-starter-validation ■com.fasterxml.jackson.core:jackson-databind ■ org.springframework:spring-web ■ org.springframework:spring-webmvc |
| spring-boot-starter-websocket | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■ org.springframework:spring-messaging ■org.springframework:spring-websocket |
| spring-boot-starter-ws | ■ org.springframework.boot:spring-boot-starter ■ org.springframework.boot:spring-boot-starter-web ■org.springframework:spring-jms ■ org.springframework:spring-oxm ■ org.springframework.ws:spring-ws-core ■ org.springframework.ws:spring-ws-support |
参考:
https://segmentfault.com/a/1190000004319673?_ea=568367
http://www.cnblogs.com/cz-xjw/p/6632402.html
http://blog.csdn.net/chszs/article/details/50610474
http://blog.csdn.net/flygoa/article/details/68484439
http://www.jianshu.com/p/85460c1d835a
http://www.jianshu.com/p/3754c0a5de90
Spring Boot中Starter是什么的更多相关文章
- 徒手撸一个 Spring Boot 中的 Starter ,解密自动化配置黑魔法!
我们使用 Spring Boot,基本上都是沉醉在它 Stater 的方便之中.Starter 为我们带来了众多的自动化配置,有了这些自动化配置,我们可以不费吹灰之力就能搭建一个生产级开发环境,有的小 ...
- Spring Boot2 系列教程(六)自定义 Spring Boot 中的 starter
我们使用 Spring Boot,基本上都是沉醉在它 Stater 的方便之中.Starter 为我们带来了众多的自动化配置,有了这些自动化配置,我们可以不费吹灰之力就能搭建一个生产级开发环境,有的小 ...
- Spring Boot中如何自定义starter?
Spring Boot starter 我们知道Spring Boot大大简化了项目初始搭建以及开发过程,而这些都是通过Spring Boot提供的starter来完成的.品达通用权限系统就是基于Sp ...
- 【Java面试】如何理解Spring Boot中的Starter?
一个工作了3年的Java程序员,遇到一个Spring Boot的问题. 他对这个问题有一些了解,但是回答得不是很好,希望参考我的高手回答. 这个问题是:"如何理解Spring Boot中的S ...
- spring boot中的约定优于配置
Spring Boot并不是一个全新的框架,而是将已有的Spring组件整合起来. Spring Boot可以说是遵循约定优于配置这个理念产生的.它的特点是简单.快速和便捷. 既然遵循约定优于配置,则 ...
- Spring Boot中使用JavaMailSender发送邮件
相信使用过Spring的众多开发者都知道Spring提供了非常好用的JavaMailSender接口实现邮件发送.在Spring Boot的Starter模块中也为此提供了自动化配置.下面通过实例看看 ...
- spring boot 中文文档地址
spring boot 中文文档地址 http://oopsguy.com/documents/springboot-docs/1.5.4/index.html Spring Boot 参考指 ...
- Spring Boot中使用RabbitMQ
很久没有写Spring Boot的内容了,正好最近在写Spring Cloud Bus的内容,因为内容会有一些相关性,所以先补一篇关于AMQP的整合. Message Broker与AMQP简介 Me ...
- 56. spring boot中使用@Async实现异步调用【从零开始学Spring Boot】
什么是"异步调用"? "异步调用"对应的是"同步调用",同步调用指程序按照定义顺序依次执行,每一行程序都必须等待上一行程序执行完成之后才能执 ...
随机推荐
- Revit API过滤元素类别(FamilySymbol与FamilyInstance)
仅OfCategory()过滤的元素包含系统FamilySymbolOfClass(typeof(FamilyInstance))过滤出来文档中族实例. ; ; ; ...
- 在ASP.NET MVC中使用Knockout实践06,自定义验证、异步验证
在上一篇中体验了Knockout.Validation的基本验证,本篇体验自定义验证和异步验证. 自定义验证规则 ko.validation有一个rules属性,专门用来存放验证规则,它是一个键值对集 ...
- ListBox使用
一.什么是ListBox? ListBox 是一个显示项集合的控件.一次可以显示 ListBox 中的多个项. ListBox继承自ItemsControl,可以使用Items或者ItemsSourc ...
- iOS objc_msgSend 报错解决方案
错误代码: objc_msgSend(self.beginRefreshingTaget, self.beginRefreshingAction, self); Too many arguments ...
- Iphone控件大全
Iphone的常用控件有哪些?看看下面 一 视图UIView和UIWindow iphone视图的规则是:一个窗口,多个视图.UIWindow相当于电视机,UIViews相当于演员. 1.显示数据的视 ...
- Windows:C:\Windows\System32\drivers\etc\hosts
原文地址:http://zhumeng8337797.blog.163.com/blog/static/100768914201001983953188/. host是一个没有扩展名的系统文件,可以用 ...
- SharePoint PowerShell 批量删除遗弃视图
前言 最近,给SharePoint升级了,然后发现,有一大批视图不需要了,而且,名字是一样的,想着怎么清理,然后,就想到了powershell. powershell 示例: $siteUrl = & ...
- 查看docker容器日志
sudo docker logs -f -t --tail 10 my-openldap-container(container ID)
- SEO如何利用百度知道日引流上千IP
个人小站长.SEO们经常为网站没有流量而发愁,一个没有流量的网站就像一个不喝水的人,迟早得死.没有流量,就没有PV,也就是说你的网站只是 给你一个人看的,那做站有什么意义呢?网站上所发布的内容都是分享 ...
- MVC异步分页
如图: 1: 控制器代码 // // GET: /AjaxUser/ shopEntities shop = new shopEntities(); public ActionResult Index ...