GitXplorerGitXplorer
y

spring-cloud-alibaba-samples

public
129 stars
57 forks
2 issues

Commits

List of commits on branch master.
Unverified
c2470a12aca37f34ed95245b4e8ffcffab3e4a26

async log

yyuhuangbin committed 4 years ago
Unverified
3b7512f3c46e5f2f384b9c0126acaa73f388edd1

upgrade Spring Cloud Alibaba Version to 2.2.1.RELEASE

yyuhuangbin committed 4 years ago
Unverified
0ed64a8fb3f97777cc2605b24e8f135b3abc3d32

Merge remote-tracking branch 'origin/master'

yyuhuangbin committed 4 years ago
Unverified
317f115d90bac887e633fe24263f6a3a387ff349

upgrade Spring Cloud Alibaba Version to 2.2.1.RELEASE

yyuhuangbin committed 4 years ago
Verified
6b05c2d4888c4e39417613e73622f5a8f492b56e

Update README.md

yyuhuangbin committed 4 years ago
Unverified
cb3f3e8297eab9e17aa056ffe74470d70a7ea3af

upgrade Spring Cloud Alibaba Version to 2.2.1.RELEASE

yyuhuangbin committed 4 years ago

README

The README file for this repository.

spring-cloud-alibaba-samples

一、准备环境

1、启动 Nacos server

Nacos Server 下载地址

下载最新版本Nacos Server, 本地启动Nacos

  • 进入nacos/bin目录,执行以下命令启动

    sh startup.sh -m standalone

    -m standalone 表示启动单机版nacos

  • 访问nacos控制台

    控制台地址:http://127.0.0.1:8848/nacos

    用户名密码:nacos/nacos

2、启动Seata Server

Seata Server 下载地址

下载最新版本Seata Server, 本地启动Seata

  • 进入seata/bin目录,执行以下命令启动seata-server

nohup sh seata-server.sh -m file &

  • 初始化业务数据库undo_log表
-- the table to store seata xid data
-- 0.7.0+ add context
-- you must to init this sql for you business databese. the seata server not need it.
-- 此脚本必须初始化在你当前的业务数据库中,用于AT 模式XID记录。与server端无关(注:业务数据库)
-- 注意此处0.3.0+ 增加唯一索引 ux_undo_log
drop table `undo_log`;
CREATE TABLE `undo_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `branch_id` bigint(20) NOT NULL,
  `xid` varchar(100) NOT NULL,
  `context` varchar(128) NOT NULL,
  `rollback_info` longblob NOT NULL,
  `log_status` int(11) NOT NULL,
  `log_created` datetime NOT NULL,
  `log_modified` datetime NOT NULL,
  `ext` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

二、使用组件介绍

  • Nacos 注册中心
  • Nacos 配置中心
  • Dubbo RPC 服务调用
  • Open Feign REST 服务调用
  • Sentinel 限流熔断
  • Seata 分布式事务解决方案

三、项目目录介绍

  • sca-common
    项目公用模块(实体类,Dubbo Api等)
  • sca-customer 消费者
  • sca-provider 服务提供者