Spring-Boot-特性

Features
Create stand-alone Spring applications

Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)

Provide opinionated 'starter' dependencies to simplify your build configuration

Automatically configure Spring and 3rd party libraries whenever possible

Provide production-ready features such as metrics, health checks and externalized configuration

Absolutely no code generation and no requirement for XML configuration

什麼是spring boot
Spring Boot是由Pivotal團隊提供的全新框架,其設計目的是用來簡化新Spring應用的初始搭建以及開發過程。該框架使用了特定的方式來進行配置,從而使開發人員不再需要定義樣板化的配置。用我的話來理解,就是spring boot其實不是什麼新的框架,它默認配置了很多框架的使用方式,就像maven整合了所有的jar包,spring boot整合了所有的框架(不知道這樣比喻是否合適)。

使用spring boot有什麼好處
其實就是簡單、快速、方便!平時如果我們需要搭建一個spring web項目的時候需要怎麼做呢?

1)配置web.xml,加載spring和spring mvc
2)配置數據庫連接、配置spring事務
3)配置加載配置文件的讀取,開啓註解
4)配置日誌文件

配置完成之後部署tomcat 調試

現在非常流行微服務,如果我這個項目僅僅只是需要發送一個郵件,如果我的項目僅僅是生產一個積分;我都需要這樣折騰一遍!

但是如果使用spring boot呢?
很簡單,我僅僅只需要非常少的幾個配置就可以迅速方便的搭建起來一套web項目或者是構建一個微服務!

使用sping boot到底有多爽,用下面這幅圖來表達

image.png
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章