码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • SpringCloud alibaba


    一、介绍
    Spring Cloud Alibaba 为分布式应用开发提供一站式解决方案。它包含开发分布式应用程序所需的所有组件,使您可以轻松地使用 Spring Cloud 开发应用程序。
    使用Spring Cloud Alibaba,您只需添加一些注解和少量配置,即可将Spring Cloud应用连接到阿里巴巴的分布式解决方案,并通过阿里巴巴中间件构建分布式应用系统。

    • 流量控制和服务降级:使用阿里巴巴哨兵进行流量控制、断路和系统自适应保护
    • 服务注册与发现:实例可以注册到阿里巴巴Nacos,客户端可以使用Spring管理的bean来发现实例。通过 Spring Cloud Netflix 支持 Ribbon,客户端负载均衡器
    • 分布式配置:使用阿里巴巴Nacos作为数据存储
    • Event-driven:构建与 Spring Cloud Stream RocketMQ Binder连接的高度可扩展的事件驱动微服务
    • 消息总线:使用 Spring Cloud Bus RocketMQ 链接分布式系统的节点
    • 分布式事务:支持高性能、易用的分布式事务解决方案与Seata
    • Dubbo RPC:通过Apache Dubbo RPC扩展Spring Cloud服务到服务调用的通信协议

    二、环境搭建
    查看cloud和springboot的对应关系
    https://start.spring.io/actuator/info
    查看cloud与alibaba的版本对应关系
    https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E
    image.png

    2.1 导入依赖

    
    <parent>
            <artifactId>spring-boot-starter-parentartifactId>
            <groupId>org.springframework.bootgroupId>
            <version>2.3.12.RELEASEversion>
        parent>
        
        
        <dependencies>
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-starter-webartifactId>
            dependency>
            <dependency>
                <groupId>org.projectlombokgroupId>
                <artifactId>lombokartifactId>
            dependency>
            <dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-starter-testartifactId>
            dependency>
        dependencies>
        
        <dependencyManagement>
             <dependencies>
                <dependency>
                    <groupId>com.alibaba.cloudgroupId>
                    <artifactId>spring-cloud-alibaba-dependenciesartifactId>
                    <version>2.2.7.RELEASEversion>
                    <type>pomtype>
                    <scope>importscope>
                dependency>
    
                <dependency>
                    <groupId>org.springframework.cloudgroupId>
                    <artifactId>spring-cloud-dependenciesartifactId>
                    <version>Hoxton.SR12version>
                    <type>pomtype>
                    <scope>importscope>
                dependency>
            dependencies>
        dependencyManagement>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
  • 相关阅读:
    网易云信 toB 质量保障体系实践
    弘玑Cyclone2022产品发布会:全新上线智能文档处理交互平台——尚书台
    Flutter Event 派发
    常见面试题-Redis专栏(二)
    BLOB, TEXT, GEOMETRY or JSON column ‘xxxx‘ can‘t have a default value
    基于C语言设计的学籍管理系统
    Java定时任务最详细讲解(普通项目,Spring项目)
    LeetCode-1110. Delete Nodes And Return Forest [C++][Java]
    Vue第一讲
    yolo各模块详解
  • 原文地址:https://blog.csdn.net/yc_Cabbage/article/details/126394774
  • 最新文章
  • 沪漂五周年了:我越来越迷茫了
    Agentic Skill Routing 实战:别再把所有 Skill 塞进 AI Agent 上下文
    MySQL-Seconds_behind_master的精度误差
    [MAF预定义ChatClient中间件-03]CachingChatClient——利用缓存省钱省时间
    AI的至暗历史:从万众期待到被政府撤资,AI的两次死亡徘徊
    Agent OS :五种驯服不确定性的范式
    PortSwigger SQL注入LAB11
    数据库即时编译JIT
    [Begin]AI Learn Data Day 0
    深度学习进阶(二十七)现代 LLM 的核心架构设计其二:SwiGLU
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号