分布式事物 Seata,AT模式

官方文档地址

1、Seata service下载地址:https://github.com/seata/seata/releases

2、下载完之后解压。

3、conf目录下自定义配置

seata—>conf—>file.conf

## transaction log store, only used in seata-server
store {
  ## store mode: file、db
##改成db
  mode = "db"

  ## file store property
  file {
    ## store location dir
    dir = "sessionStore"
    # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions
    maxBranchSessionSize = 16384
    # globe session size , if exceeded throws exceptions
    maxGlobalSessionSize = 512
    # file buffer size , if exceeded allocate new buffer
    fileWriteBufferCacheSize = 16384
    # when recover batch read size
    sessionReloadReadSize = 100
    # async, sync
    flushDiskMode = async
  }

  ## database store property
  db {
    ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp) etc.
    datasource = "druid"
    ## mysql/oracle/postgresql/h2/oceanbase etc.
    dbType = "mysql"
    driverClassName = "com.mysql.jdbc.Driver"

## 如果要是没有seata数据库,要建立一个
    url = "jdbc:mysql://172.0.0.1:3306/seata?useUnicode=true&characterEncoding=UTF-8"
    user = "123"
    password = "123"
    minConn = 5
    maxConn = 30

## 建好数据库之后新建下面的这三张表
    globalTable = "global_table"
    branchTable = &#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值