1. 程式人生 > >spring boot 與 spring cloud 關系

spring boot 與 spring cloud 關系

automatic intel tro imu zed ont jet cloud party

公司使用spring cloud,所以稍微了解一下

看了一下spring官網對 spring boot 以及 spring cloud 的解釋

Spring Boot

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.

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的一套提供給雲應用開發者的工具包

各自的特點:

Spring Boot

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.


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

spring boot 與 spring cloud 關系