公司使用spring cloud,因此稍微瞭解一下spring
看了一下spring官網對 spring boot 以及 spring cloud 的解釋session
Spring Bootapp
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.ide
Spring Cloud
Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). Coordination of distributed systems leads to boiler plate patterns, and using Spring Cloud developers can quickly stand up services and applications that implement those patterns. They will work well in any distributed environment, including the developer's own laptop, bare metal data centres, and managed platforms such as Cloud Foundry.工具
Spring Boot是但願經過註解(Annotation),來解決Spring配置文件較多的問題,從而能像Python的Flask、Ruby的Rails那樣快速搭建Web應用,尤爲是REST API的原型學習
Spring Cloud是基於Spring Boot的一套提供給雲應用開發者的工具包ui
各自的特色:spa
Spring Bootcode
Features
Create stand-alone Spring applications
Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
Provide opinionated 'starter' POMs to simplify your Maven configuration
Automatically configure Spring whenever possible
Provide production-ready features such as metrics, health checks and externalized configuration
Absolutely no code generation and no requirement for XML configuration
The reference guide includes detailed descriptions of all the features, plus an extensive howto for common use cases.orm
Spring Cloud
Spring Cloud builds on Spring Boot by providing a bunch of libraries that enhance the behaviour of an application when added to the classpath. You can take advantage of the basic default behaviour to get started really quickly, and then when you need to, you can configure or extend to create a custom solution.
因此,要學習 spring cloud 得首先學習 spring boot