谷粒商城day15-分布式组件-SpringCloud Alibaba简介
1.简介
为了方便,服务有统一的注册中心与配置中心
前端请求访问后端服务时,先通过API网关,进行路由,过滤,监控等来做一些预先的操作
Spring Cloud Alibaba 致力于提供微服务开发的一站式解决方案。此项目包含开发分布式应用微服务的必需组件,方便开发者通过 Spring Cloud 编程模型轻松使用这些组件来开发分布式应用服务。
依托 Spring Cloud Alibaba,您只需要添加一些注解和少量配置,就可以将 Spring Cloud 应用接入阿里微服务解决方案,通过阿里中间件来迅速搭建分布式应用系统。
组件的选择
为什么不选择springcloud里集成的一些组件了呢
3.SpringCloud Alibaba中文文档
https://github.com/alibaba/spring-cloud-alibaba/blob/master/README-zh.md
4.引入依赖 (放入common模块的pom文件中,dependencyManagement会为我们自动管理好版本,后面引用就不需要指定版本)
<dependencyManagement> <dependencies> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-alibaba-dependencies</artifactId> <version>2.2.0.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>