公司使用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