SpringCloud Alibaba 简介

What is SpringCloud Alibaba ?

Spring Cloud Alibaba provides a one-stop solution for distributed application development. It contains all the components required to develop distributed applications, making it easy for you to develop your applications using Spring Cloud.

With Spring Cloud Alibaba, you only need to add some annotations and a small amount of configurations to connect Spring Cloud applications to the distributed solutions of Alibaba, and build a distributed application system with Alibaba middleware.

SpringCloud Alibaba 提供分布式应用开发一站式解决方案。它包含开发分布式应用需要的所有组件,让你可以轻松使用SpringCloud开发应用。

使用SpringCloud Alibaba,你仅仅需要添加一些注解和少量的配置就可以在SpringCloud应用中使用Aliabba分布式解决方案,并使用Alibaba中间件构建分布式应用。

SpringCloud Alibaba Futures?

  • Flow control and service degradation:flow control, circuit breaking and system adaptive protection with Sentinel.
  • Service registration and discovery:instances can be registered with Nacos and clients can discover the instances using Spring-managed beans. Supports Ribbon, the client side load-balancer via Spring Cloud Netflix.
  • Distributed Configuration:using Nacos as a data store
  • Event-driven:building highly scalable event-driven microservices connected with Spring Cloud Stream RocketMQ Binder
  • Message Bus: link nodes of a distributed system with Spring Cloud Bus RocketMQ
  • Distributed Transaction:support for distributed transaction solution with high performance and ease of use with Seata
  • Dubbo RPC:extend the communication protocols of Spring Cloud service-to-service calls by Dubbo RPC
  • Alibaba Cloud Object Storage:Spring Resource Abstraction for OSS. Alibaba Cloud Object Storage Service (OSS) is an encrypted, secure, cost-effective, and easy-to-use object storage service that enables you to store, back up, and archive large amounts of data in the cloud
  • 流量控制与服务降级:使用Sentinel进行流量控制,断路和系统自适应保护。
  • 服务注册与发现:服务实例可以注册到Nacos上,客户端可以使用Spring管理的bean发现服务实例。支持通过Spring Cloud Netflix 的客户端负载均衡容器Ribbon。
  • 分布式配置:使用Nacos作为数据存储。
  • 消息总线:使用Spring Cloud Bus RocketMQ 连接分布式系统节点。
  • 分布式事务:支持高性能并跟易于使用的Seata分布式解决方案。
  • Dubbo RPC:支持使用Dubbo RPC 通信协议进行服务与服务间的调用。
  • 阿里云对象存储:用于OSS的Spring资源抽象。 阿里云对象存储服务(OSS)是一种加密,安全,经济高效且易于使用的对象存储服务,可让您在云中存储,备份和存档大量数据。

How to use SpingCloud Alibaba ?

Create Spring Boot project

image-20200614144702965

Add SpringCloud Alibaba Dependency

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<!--spring cloud alibaba 2.1.0.RELEASE-->
<dependency>
	<groupId>com.alibaba.cloud</groupId>
	<artifactId>spring-cloud-alibaba-dependencies</artifactId>
	<version>2.1.0.RELEASE</version>
	<type>pom</type>
	<scope>import</scope>
</dependency>

spring-cloud-alibaba-dependencies include all of the Spring Cloud Alibaba features,If you don’t want you can add individual starters for the features you would like.

原文地址:https://www.cnblogs.com/dtdx/p/13124848.html