搶先一步
VMware 提供培訓和認證,以加速您的進展。
瞭解更多Spring Cloud Alibaba ( https://sca.aliyun.com/en-us/ ) 提供分散式應用程式開發的一站式解決方案。它包含開發分散式應用程式所需的所有組件,讓您可以輕鬆地使用 Spring Cloud 開發應用程式。
使用 Spring Cloud Alibaba,您只需新增一些註解和少量的組態,即可將 Spring Cloud 應用程式連接到阿里巴巴的分散式解決方案,並使用阿里巴巴中介軟體建構分散式應用程式系統。
流量控制與服務降級:使用 Alibaba Sentinel 進行流量控制、斷路和系統自適應保護
服務註冊與發現:實例可以向 Alibaba Nacos 註冊,客戶端可以使用 Spring 管理的 Bean 發現實例。通過 Spring Cloud Netflix 支援客戶端負載平衡器 Ribbon
分散式配置:使用 Alibaba Nacos 作為資料儲存
事件驅動:建構高度可擴展的事件驅動微服務,並與 Spring Cloud Stream RocketMQ Binder 連接
消息匯流排:使用 Spring Cloud Bus RocketMQ 連接分散式系統的節點
分散式交易:使用 Seata 支援高效能、易於使用的分散式交易解決方案
Dubbo RPC:通過 Apache Dubbo RPC 擴展 Spring Cloud 服務對服務調用的通訊協定
所有 Spring Boot Starter 都維護在 Alibaba Cloud Spring Boot Project 中。
適用於 Alibaba Cloud Object Storage Service 的 Spring Boot Starter
適用於 Alibaba Cloud Short Message Service 的 Spring Boot Starter
適用於 Alibaba Cloud Redis 的 Spring Boot Starter
適用於 Alibaba Cloud RDS MySQL 的 Spring Boot Starter
適用於 Alibaba Cloud SchedulerX 的 Spring Boot Starter
開始使用最簡單的方式是包含 Spring Cloud BOM,然後將 spring-cloud-alibaba-dependencies
新增到應用程式的類別路徑中。如果您不想包含所有 Spring Cloud Alibaba 功能,可以為您想要的功能新增個別的 Starter。
pom.xml 中的 spring-cloud-alibaba-dependencies
依賴項
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>{project-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
如果您想使用適用於 Alibaba Cloud 服務的 Spring Boot Starter,則應將 Aliyun Spring Boot BOM 新增到您的 pom.xml 中。
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>aliyun-spring-boot-dependencies</artifactId>
<version>{project-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
企業級分散式應用服務 (EDAS) 是一種平台即服務 (PaaS) 服務,用於應用程式託管和微服務管理,提供應用程式開發、部署、監控和 O&M 等全堆疊解決方案。它支援 Apache Dubbo、Spring Cloud 和其他微服務運行時環境,幫助您輕鬆地將應用程式遷移到 Alibaba Cloud。
請依照此教學準備 Java Spring Boot/Cloud 應用程式,以便在 EDAS 中部署。
微服務引擎 (MSE) 是適用於主流開放原始碼微服務框架 Spring Cloud 的微服務平台,包括治理中心和完全託管的註冊/配置中心,例如 Zookeeper、Eureka 和 Nacos。
您的應用程式無需修改程式碼和組態,即可通過 javaagent 技術享受產品提供的全面微服務治理能力。
MSE 還提供高可用性、免運維叢集,例如 zookeeper、Nacos 和 Eureka,通過託管註冊/配置中心,與開放原始碼產品的標準介面完全相容。
請依照此教學在 MSE 中建構用於服務註冊的 Nacos 引擎。