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 = &#