解压seata-server安装包到指定目录,修改
conf
目录下的
file.conf
配置文件,主要修改自定义事务组名称,事务日志存储模式为
db
及数据库连接信息;
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
}
## transaction log store, only used in seata-server
store {
## store mode: file、db
#修改此处将事务信息存储到数据库中
mode = "db"
## file store property
file {
## store location dir
dir = "sessionStore"
}
## database store property
db {
## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp) etc.
datasource = "dbcp"
## mysql/oracle/h2/oceanbase etc.
db-type = "mysql"
driver-class-name = "com.mysql.cj.jdbc.Driver"
#修改数据库连接地址
url = "jdbc:mysql://127.0.0.1:3306/seata-server?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&allowMultiQueries=true&useSSL=false&tinyInt1isBit=false&serverTimezone=GMT%2B8"
#修改数据库用户名
user = "root"
#修改数据库密码
password = "root"
}
}
2019-12-31 16:43:03.065 INFO 4848 --- [nio-8180-exec-1] c.j.s.service.impl.OrderServiceImpl : ------->下单开始
2019-12-31 16:43:03.081 WARN 4848 --- [nfigOperate_2_2] io.seata.config.FileConfiguration : Could not found property client.rm.report.retry.count, try to use default value instead.
2019-12-31 16:43:03.082 WARN 4848 --- [nfigOperate_2_2] io.seata.config.FileConfiguration : Could not found property client.report.success.enable, try to use default value instead.
2019-12-31 16:43:03.082 WARN 4848 --- [nfigOperate_2_2] io.seata.config.FileConfiguration : Could not found property client.rm.lock.retry.policy.branch-rollback-on-conflict, try to use default value instead.
2019-12-31 16:43:03.171 INFO 4848 --- [nio-8180-exec-1] c.j.s.service.impl.OrderServiceImpl : ------->order-service中扣减库存开始
2019-12-31 16:43:03.611 INFO 4848 --- [orage-service-1] c.netflix.config.ChainedDynamicProperty : Flipping property: seata-storage-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-12-31 16:43:03.639 INFO 4848 --- [orage-service-1] c.netflix.loadbalancer.BaseLoadBalancer : Client: seata-storage-service instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=seata-storage-service,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
2019-12-31 16:43:03.644 INFO 4848 --- [orage-service-1] c.n.l.DynamicServerListLoadBalancer : Using serverListUpdater PollingServerListUpdater
2019-12-31 16:43:03.669 INFO 4848 --- [orage-service-1] c.netflix.config.ChainedDynamicProperty : Flipping property: seata-storage-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-12-31 16:43:03.670 INFO 4848 --- [orage-service-1] c.n.l.DynamicServerListLoadBalancer : DynamicServerListLoadBalancer for client seata-storage-service initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=seata-storage-service,current list of Servers=[10.172.29.232:8181],Load balancer stats=Zone stats: {unknown=[Zone:unknown; Instance count:1; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;]
},Server stats: [[Server:10.172.29.232:8181; Zone:UNKNOWN; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0]
]}ServerList:com.alibaba.cloud.nacos.ribbon.NacosServerList@438c717d
2019-12-31 16:43:03.919 INFO 4848 --- [nio-8180-exec-1] c.j.s.service.impl.OrderServiceImpl : ------->order-service中扣减库存结束
2019-12-31 16:43:03.920 INFO 4848 --- [nio-8180-exec-1] c.j.s.service.impl.OrderServiceImpl : ------->order-service中扣减余额开始
2019-12-31 16:43:03.958 INFO 4848 --- [count-service-1] c.netflix.config.ChainedDynamicProperty : Flipping property: seata-account-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-12-31 16:43:03.959 INFO 4848 --- [count-service-1] c.netflix.loadbalancer.BaseLoadBalancer : Client: seata-account-service instantiated a LoadBalancer: DynamicServerListLoadBalancer:{NFLoadBalancer:name=seata-account-service,current list of Servers=[],Load balancer stats=Zone stats: {},Server stats: []}ServerList:null
2019-12-31 16:43:03.960 INFO 4848 --- [count-service-1] c.n.l.DynamicServerListLoadBalancer : Using serverListUpdater PollingServerListUpdater
2019-12-31 16:43:03.970 INFO 4848 --- [count-service-1] c.netflix.config.ChainedDynamicProperty : Flipping property: seata-account-service.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-12-31 16:43:03.970 INFO 4848 --- [count-service-1] c.n.l.DynamicServerListLoadBalancer : DynamicServerListLoadBalancer for client seata-account-service initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=seata-account-service,current list of Servers=[10.172.29.232:8182],Load balancer stats=Zone stats: {unknown=[Zone:unknown; Instance count:1; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;]
},Server stats: [[Server:10.172.29.232:8182; Zone:UNKNOWN; Total Requests:0; Successive connection failure:0; Total blackout seconds:0; Last connection made:Thu Jan 01 08:00:00 CST 1970; First connection made: Thu Jan 01 08:00:00 CST 1970; Active Connections:0; total failure count in last (1000) msecs:0; average resp time:0.0; 90 percentile resp time:0.0; 95 percentile resp time:0.0; min resp time:0.0; max resp time:0.0; stddev resp time:0.0]
]}ServerList:com.alibaba.cloud.nacos.ribbon.NacosServerList@2be5bb61
2019-12-31 16:43:03.988 INFO 4848 --- [nio-8180-exec-1] c.j.s.service.impl.OrderServiceImpl : ------->order-service中扣减余额结束
2019-12-31 16:43:03.988 INFO 4848 --- [nio-8180-exec-1] c.j.s.service.impl.OrderServiceImpl : ------->order-service中修改订单状态开始
2019-12-31 16:43:03.992 INFO 4848 --- [nio-8180-exec-1] c.j.s.service.impl.OrderServiceImpl : ------->order-service中修改订单状态结束
2019-12-31 16:43:03.992 INFO 4848 --- [nio-8180-exec-1] c.j.s.service.impl.OrderServiceImpl : ------->下单结束