美文网首页
Spring Cloud Alibaba

Spring Cloud Alibaba

作者: little多米 | 来源:发表于2021-03-27 17:13 被阅读0次

    Spring Cloud Alibaba 致力于提供微服务开发的一站式解决方案。此项目包含开发分布式应用微服务的必需组件,方便开发者通过 Spring Cloud 编程模型轻松使用这些组件来开发分布式应用服务。
    依托 Spring Cloud Alibaba,只需要添加一些注解和少量配置,就可以将 Spring Cloud 应用接入阿里微服务解决方案,通过阿里中间件来迅速搭建分布式应用系统。

    主要功能

    • 服务限流降级:默认支持 WebServlet、WebFlux, OpenFeign、RestTemplate、Spring Cloud Gateway, Zuul, Dubbo 和 RocketMQ 限流降级功能的接入,可以在运行时通过控制台实时修改限流降级规则,还支持查看限流降级 Metrics 监控。
    • 服务注册与发现:适配 Spring Cloud 服务注册与发现标准,默认集成了 Ribbon 的支持。
    • 分布式配置管理:支持分布式系统中的外部化配置,配置更改时自动刷新。
    • 消息驱动能力:基于 Spring Cloud Stream 为微服务应用构建消息驱动能力。
    • 分布式事务:使用 @GlobalTransactional 注解, 高效并且对业务零侵入地解决分布式事务问题。
    • 阿里云对象存储:云存储服务。支持在任何应用、任何时间、任何地点存储和访问任意类型的数据。
    • 分布式任务调度:基于 Cron 表达式的任务调度服务。同时提供分布式的任务执行模型,如网格任务。网格任务支持海量子任务均匀分配到所有 Worker(schedulerx-client)上执行。
    • 阿里云短信服务

    如何使用

    如何引入依赖

    如果需要使用已发布的版本,在 dependencyManagement 中添加如下配置。

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

    然后在 dependencies 中添加自己所需使用的依赖即可使用。

    演示 Demo

    Example 列表:
    Sentinel Example
    Nacos Config Example
    Nacos Discovery Example
    RocketMQ Example
    Seata Example
    Alibaba Cloud OSS Example
    Alibaba Cloud SMS Example
    Alibaba Cloud SchedulerX Example

    相关文章

      网友评论

          本文标题:Spring Cloud Alibaba

          本文链接:https://www.haomeiwen.com/subject/aseyhltx.html