日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Spring和SpringBoot到底有什么區(qū)別?

對于SpringSpringBoot到底有什么區(qū)別,我聽到了很多答案,剛開始邁入學(xué)習(xí)SpringBoot的我當(dāng)時(shí)也是一頭霧水,隨著經(jīng)驗(yàn)的積累、我慢慢理解了這兩個(gè)框架到底有什么區(qū)別,相信對于用了SpringBoot很久的同學(xué)來說,還不是很理解SpringBoot到底和Spring有什么區(qū)別,看完文章中的比較,或許你有了不同的答案和看法!

一、看一下spring的全部項(xiàng)目

spring 家族 有很多項(xiàng)目,springboot、spring framework、spring cloud等。

我們常用的也就是,springboot、springcloud、springsecurity、springdata。常說的 springmvc 只是spring framework 的特性之一。

二、springboot核心能力

1、內(nèi)嵌 Servlet 容器,可以直接打成jar包,通過 java -jar xx.jar 運(yùn)行項(xiàng)目。

2、提供 starter pom 系列,簡化maven的依賴加載,減少依賴沖突的發(fā)生。

3、支持自動化配置,如下圖。application.properties 文件在引入springboot和未引入springboot時(shí),是不一樣的。

實(shí)現(xiàn)的源碼:springboot回去判斷引入的jar包是否有 spring.factories 文件

@EnableAutoConfiguration
@Import({AutoConfigurationImportSelector.class})
protected List getCandidateConfigurations(AnnotationMetadata metadata, AnnotationAttributes attributes) {
  List configurations = SpringFactoriesLoader.loadFactoryNames(this.getSpringFactoriesLoaderFactoryClass(), this.getBeanClassLoader());
  Assert.notEmpty(configurations, "No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.");
  return configurations;
}

總結(jié):springboot 是 spring 家族的一個(gè)項(xiàng)目,他的目標(biāo)是提高使用者的開發(fā)效率。


分享標(biāo)題:Spring和SpringBoot到底有什么區(qū)別?
文章路徑:http://www.dlmjj.cn/article/dpigspj.html