spring cloud alibaba 分散式事務解決方案之seata-1.3.0
阿新 • • 發佈:2020-11-04
1.github上下載seata-1.3.0.zip包
連結:https://github.com/seata/seata/releases/download/v1.3.0/seata-server-1.3.0.zip
2.開啟seata壓縮包,找到conf資料夾下的registry.conf修改註冊方式和配置方式為nacos,如下:
## transaction log store, only used in seata-server #這裡手動加入service模組 service { #transaction service group mapping #修改,可不改,my_test_tx_group隨便起名字。 vgroup_mapping.my_test_tx_group = "default" #only support when registry.type=file, please don't set multiple addresses # 此服務的地址 default.grouplist = "127.0.0.1:8091" #disable seata disableGlobalTransaction = false } store { ## store mode: file、db、redis 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)/HikariDataSource(hikari) etc. datasource = "druid" ## mysql/oracle/postgresql/h2/oceanbase etc. dbType = "mysql" driverClassName = "com.mysql.cj.jdbc.Driver" url = "jdbc:mysql://119.29.165.98:3306/seata?useSSL=false&serverTimezone=Asia/Shanghai" user = "root" password = "@Cj19861127" minConn = 5 maxConn = 30 globalTable = "global_table" branchTable = "branch_table" lockTable = "lock_table" queryLimit = 100 maxWait = 5000 } ## redis store property redis { host = "127.0.0.1" port = "6379" password = "" database = "0" minConn = 1 maxConn = 10 queryLimit = 100 } }