初识Spring Cloud

微服务

来自Spring官方的介绍:

Microservice architectures are the ‘new normal’. Building small, self-contained, ready to run applications can bring great flexibility and added resilience to your code. Spring Boot’s many purpose-built features make it easy to build and run your microservices in production at scale. And don’t forget, no microservice architecture is complete without [Spring Cloud](https://spring.io/cloud) ‒ easing administration and boosting your fault-tolerance.

微服务架构是‘新常态’。构建小型,独立,可运行的应用程序可以带来极大的灵活性,并让你的代码更具弹性。Spring Boot的许多专用功能使你在大规模生产中构建和运行微服务变得很容易。而且不要忘记,没有Spring Cloud ‒简化管理并提高容错能力,就不会有任何微服务架构是完整的。

  • 什么是微服务?

    Microservices are a modern approach to software whereby application code is delivered in small, manageable pieces, independent of others.

    微服务是一种现代化的软件方法,通过该方法,应用程序代码以可管理的小段形式交付,彼此独立。

  • 为什么要使用微服务?

    Their small scale and relative isolation can lead to many additional benefits, such as easier maintenance, improved productivity, greater fault tolerance, better business alignment, and more.

    它们的规模小和相对隔离可以带来许多其他好处,例如更容易维护,提高生产率,更大的容错能力,更好的业务协调等等。

  • Microservices with Spring Boot

    With Spring Boot, your microservices can start small and iterate fast. That’s why it has become the de facto standard for Java™ microservices. Quickstart your project with Spring Initializr and then package as a JAR. With Spring Boot’s embedded server model, you’re ready to go in minutes.

    使用Spring Boot,您的微服务可以从小规模开始并且快速迭代。这就是为什么它已成为Java™微服务的事实上的标准的原因。使用Spring Initializr快速启动您的项目,然后打包为JAR。使用Spring Boot的嵌入式服务器模型,您就可以在几分钟内完成准备工作。

  • Microservice resilience with Spring Cloud

    The distributed nature of microservices brings challenges. Spring helps you mitigate these. With several ready-to-run cloud patterns, [Spring Cloud](https://spring.io/cloud) can help with service discovery, load-balancing, circuit-breaking, distributed tracing, and monitoring. It can even act as an API gateway.

    微服务的分布式性质带来了挑战。Spring可以帮助您缓解这些问题。有了几种现成的云模式,Spring Cloud可以帮助进行服务发现,负载平衡,断路,分布式跟踪和监视。它甚至可以充当API网关。

通过介绍,也大概明白了。使用Spring Boot可以快捷创建单个微服务应用(Microservice),极大的简化了Spring配置(Spring快速配置的脚手架)。而Spring Cloud则是全局的服务治理框架。

Spring Boot可以离开Spring Cloud独立使用开发项目,但是Spring Cloud离不开Spring Boot,由于Spring Cloud 网关,服务注册与发现,配置中心,熔断等等都是基于Spring Boot来现实的。属于依赖的关系。

在这里插入图片描述

如果还不明白Spring Boot与Spring Cloud的关系与区别,请查阅知乎:Spring Boot 与Spring Cloud是什么关系?

Spring Cloud

Spring Cloud是一系列框架的有序集合。它利用Spring Boot的开发便利性巧妙地简化了分布式系统基础设施的开发,如服务发现注册、配置中心、消息总线、负载均衡、断路器、数据监控等,都可以用Spring Boot的开发风格做到一键启动和部署。Spring Cloud并没有重复制造轮子,它只是将各家公司开发的比较成熟、经得起实际考验的服务框架组合起来,通过Spring Boot风格进行再封装屏蔽掉了复杂的配置和实现原理,最终给开发者留出了一套简单易懂、易部署和易维护的分布式系统开发工具包。 – 摘自百度百科

开篇只做一个简单的介绍,后续文章持续更新。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值