一、特征
創(chuàng)建獨(dú)立的Spring應(yīng)用程序
直接嵌入Tomcat,Jetty或Undertow(無(wú)需部署WAR文件)
提供自以為是的“入門(mén)”依賴(lài)項(xiàng),以簡(jiǎn)化構(gòu)建配置
盡可能自動(dòng)配置Spring和3rd Party庫(kù)
提供可用于生產(chǎn)的功能,例如指標(biāo)舞虱,運(yùn)行狀況檢查和外部化配置
完全沒(méi)有代碼生成欢际,也不需要XML配置
二母市、快速入門(mén)
1、創(chuàng)建maven工程
2损趋、引入SpringBoot依賴(lài)
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
</parent>
3患久、添加spring-boot啟動(dòng)器依賴(lài)(添加啟動(dòng)器后 web工程常用的依賴(lài)會(huì)自動(dòng)幫你引入)
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
4、編寫(xiě)啟動(dòng)類(lèi)
5浑槽、編寫(xiě)Controller測(cè)試訪問(wèn)
6蒋失、啟動(dòng)
出現(xiàn)以下內(nèi)容表示成功!M┎!篙挽!