SpringBoot入門

@作者博客

簡單記憶一下知識 :

SpringBoot 是什么?

快速開發(fā),簡單入門.

IDEA Main快捷鍵 (psvm)

入口程序:

@SpringBootApplication //用來標(biāo)注一個主程序類,說明 這個是Spring Boot 的應(yīng)用

public class SpringBootStone{

public static void main(String [] args){

//程序入口,類似C#程序的入口一樣

SpringApplication.run(SpringBootStone.class,args);

}

}

為了讓項目變?yōu)榭蓤?zhí)行的jar包文件,加入Maven的jar包

<pre class="md-fences md-end-block" lang="xml" contenteditable="false" cid="n40" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; font-size: 0.9rem; white-space: pre; margin-top: 0px; margin-bottom: 20px; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(54, 59, 64); text-align: left; break-inside: avoid; display: block; position: relative !important; padding: 10px 30px; border: 1px solid; width: inherit; color: rgb(184, 191, 198); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: inherit inherit; background-repeat: inherit inherit;"><plugins>
?
<plugin>
?
<groupId>org.springframework.boot</groupId>
?
<artifactId>spring-boot-maven-plugin</artifactId>
?
</plugin>
?
</plugins>
?</pre>

SpringBoot 的啟動器,有很多,它都幫我們配置好了,依賴版本號

image

可以啟動了.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容