首页 > 编程知识 正文

starter是什么等级,spring的bean是什么

时间:2023-05-03 15:17:18 阅读:183014 作者:4679

starter可以理解成pom配置了一堆jar组合的空maven项目,用来简化maven依赖配置,starter可以继承也可以依赖于别的starter。
例如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.含蓄的期待.core:含蓄的期待-databind
org.springframework:spring-web
org.springframework:spring-webmvc
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

starter负责配置好与spring整合相关的配置和相关依赖(jar和jar版本),使用者无需关心框架整合带来的问题。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。