mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Merge pull request #996 from slievrly/master_1
update seata version and sample
This commit is contained in:
commit
f904bb4acb
@ -20,7 +20,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<sentinel.version>1.6.3</sentinel.version>
|
<sentinel.version>1.6.3</sentinel.version>
|
||||||
<oss.version>3.1.0</oss.version>
|
<oss.version>3.1.0</oss.version>
|
||||||
<seata.version>0.7.1</seata.version>
|
<seata.version>0.9.0</seata.version>
|
||||||
<nacos.client.version>1.1.1</nacos.client.version>
|
<nacos.client.version>1.1.1</nacos.client.version>
|
||||||
<nacos.config.version>0.8.0</nacos.config.version>
|
<nacos.config.version>0.8.0</nacos.config.version>
|
||||||
<acm.version>1.0.9</acm.version>
|
<acm.version>1.0.9</acm.version>
|
||||||
|
@ -4,7 +4,7 @@ transport {
|
|||||||
#NIO NATIVE
|
#NIO NATIVE
|
||||||
server = "NIO"
|
server = "NIO"
|
||||||
#enable heartbeat
|
#enable heartbeat
|
||||||
heartbeat = true
|
heartbeat = false
|
||||||
#thread factory for netty
|
#thread factory for netty
|
||||||
thread-factory {
|
thread-factory {
|
||||||
boss-thread-prefix = "NettyBoss"
|
boss-thread-prefix = "NettyBoss"
|
||||||
@ -46,17 +46,22 @@ client {
|
|||||||
retry.times = 30
|
retry.times = 30
|
||||||
}
|
}
|
||||||
report.retry.count = 5
|
report.retry.count = 5
|
||||||
|
tm.commit.retry.count = 1
|
||||||
|
tm.rollback.retry.count = 1
|
||||||
}
|
}
|
||||||
transaction {
|
transaction {
|
||||||
undo.data.validation = true
|
undo.data.validation = true
|
||||||
undo.log.serialization = "jackson"
|
undo.log.serialization = "jackson"
|
||||||
|
undo.log.save.days = 7
|
||||||
|
#schedule delete expired undo_log in milliseconds
|
||||||
|
undo.log.delete.period = 86400000
|
||||||
|
undo.log.table = "undo_log"
|
||||||
}
|
}
|
||||||
|
|
||||||
## metrics settings
|
support {
|
||||||
metrics {
|
## spring
|
||||||
enabled = false
|
spring {
|
||||||
registry-type = "compact"
|
# auto proxy the DataSource bean
|
||||||
# multi exporters use comma divided
|
datasource.autoproxy = false
|
||||||
exporter-list = "prometheus"
|
}
|
||||||
exporter-prometheus-port = 9898
|
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ registry {
|
|||||||
|
|
||||||
nacos {
|
nacos {
|
||||||
serverAddr = "localhost"
|
serverAddr = "localhost"
|
||||||
namespace = "public"
|
namespace = ""
|
||||||
cluster = "default"
|
cluster = "default"
|
||||||
}
|
}
|
||||||
eureka {
|
eureka {
|
||||||
@ -50,8 +50,7 @@ config {
|
|||||||
|
|
||||||
nacos {
|
nacos {
|
||||||
serverAddr = "localhost"
|
serverAddr = "localhost"
|
||||||
namespace = "public"
|
namespace = ""
|
||||||
cluster = "default"
|
|
||||||
}
|
}
|
||||||
consul {
|
consul {
|
||||||
serverAddr = "127.0.0.1:8500"
|
serverAddr = "127.0.0.1:8500"
|
||||||
|
@ -4,7 +4,7 @@ transport {
|
|||||||
#NIO NATIVE
|
#NIO NATIVE
|
||||||
server = "NIO"
|
server = "NIO"
|
||||||
#enable heartbeat
|
#enable heartbeat
|
||||||
heartbeat = true
|
heartbeat = false
|
||||||
#thread factory for netty
|
#thread factory for netty
|
||||||
thread-factory {
|
thread-factory {
|
||||||
boss-thread-prefix = "NettyBoss"
|
boss-thread-prefix = "NettyBoss"
|
||||||
@ -46,17 +46,22 @@ client {
|
|||||||
retry.times = 30
|
retry.times = 30
|
||||||
}
|
}
|
||||||
report.retry.count = 5
|
report.retry.count = 5
|
||||||
|
tm.commit.retry.count = 1
|
||||||
|
tm.rollback.retry.count = 1
|
||||||
}
|
}
|
||||||
transaction {
|
transaction {
|
||||||
undo.data.validation = true
|
undo.data.validation = true
|
||||||
undo.log.serialization = "jackson"
|
undo.log.serialization = "jackson"
|
||||||
|
undo.log.save.days = 7
|
||||||
|
#schedule delete expired undo_log in milliseconds
|
||||||
|
undo.log.delete.period = 86400000
|
||||||
|
undo.log.table = "undo_log"
|
||||||
}
|
}
|
||||||
|
|
||||||
## metrics settings
|
support {
|
||||||
metrics {
|
## spring
|
||||||
enabled = false
|
spring {
|
||||||
registry-type = "compact"
|
# auto proxy the DataSource bean
|
||||||
# multi exporters use comma divided
|
datasource.autoproxy = false
|
||||||
exporter-list = "prometheus"
|
}
|
||||||
exporter-prometheus-port = 9898
|
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ registry {
|
|||||||
|
|
||||||
nacos {
|
nacos {
|
||||||
serverAddr = "localhost"
|
serverAddr = "localhost"
|
||||||
namespace = "public"
|
namespace = ""
|
||||||
cluster = "default"
|
cluster = "default"
|
||||||
}
|
}
|
||||||
eureka {
|
eureka {
|
||||||
@ -50,8 +50,7 @@ config {
|
|||||||
|
|
||||||
nacos {
|
nacos {
|
||||||
serverAddr = "localhost"
|
serverAddr = "localhost"
|
||||||
namespace = "public"
|
namespace = ""
|
||||||
cluster = "default"
|
|
||||||
}
|
}
|
||||||
consul {
|
consul {
|
||||||
serverAddr = "127.0.0.1:8500"
|
serverAddr = "127.0.0.1:8500"
|
||||||
|
@ -4,7 +4,7 @@ transport {
|
|||||||
#NIO NATIVE
|
#NIO NATIVE
|
||||||
server = "NIO"
|
server = "NIO"
|
||||||
#enable heartbeat
|
#enable heartbeat
|
||||||
heartbeat = true
|
heartbeat = false
|
||||||
#thread factory for netty
|
#thread factory for netty
|
||||||
thread-factory {
|
thread-factory {
|
||||||
boss-thread-prefix = "NettyBoss"
|
boss-thread-prefix = "NettyBoss"
|
||||||
@ -46,17 +46,22 @@ client {
|
|||||||
retry.times = 30
|
retry.times = 30
|
||||||
}
|
}
|
||||||
report.retry.count = 5
|
report.retry.count = 5
|
||||||
|
tm.commit.retry.count = 1
|
||||||
|
tm.rollback.retry.count = 1
|
||||||
}
|
}
|
||||||
transaction {
|
transaction {
|
||||||
undo.data.validation = true
|
undo.data.validation = true
|
||||||
undo.log.serialization = "jackson"
|
undo.log.serialization = "jackson"
|
||||||
|
undo.log.save.days = 7
|
||||||
|
#schedule delete expired undo_log in milliseconds
|
||||||
|
undo.log.delete.period = 86400000
|
||||||
|
undo.log.table = "undo_log"
|
||||||
}
|
}
|
||||||
|
|
||||||
## metrics settings
|
support {
|
||||||
metrics {
|
## spring
|
||||||
enabled = false
|
spring {
|
||||||
registry-type = "compact"
|
# auto proxy the DataSource bean
|
||||||
# multi exporters use comma divided
|
datasource.autoproxy = false
|
||||||
exporter-list = "prometheus"
|
}
|
||||||
exporter-prometheus-port = 9898
|
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ registry {
|
|||||||
|
|
||||||
nacos {
|
nacos {
|
||||||
serverAddr = "localhost"
|
serverAddr = "localhost"
|
||||||
namespace = "public"
|
namespace = ""
|
||||||
cluster = "default"
|
cluster = "default"
|
||||||
}
|
}
|
||||||
eureka {
|
eureka {
|
||||||
@ -50,8 +50,7 @@ config {
|
|||||||
|
|
||||||
nacos {
|
nacos {
|
||||||
serverAddr = "localhost"
|
serverAddr = "localhost"
|
||||||
namespace = "public"
|
namespace = ""
|
||||||
cluster = "default"
|
|
||||||
}
|
}
|
||||||
consul {
|
consul {
|
||||||
serverAddr = "127.0.0.1:8500"
|
serverAddr = "127.0.0.1:8500"
|
||||||
|
@ -99,12 +99,16 @@ CREATE TABLE `account_tbl` (
|
|||||||
点击这个页面 [https://github.com/seata/seata/releases](https://github.com/seata/seata/releases),下载最新版本的 Seata Server 端.
|
点击这个页面 [https://github.com/seata/seata/releases](https://github.com/seata/seata/releases),下载最新版本的 Seata Server 端.
|
||||||
|
|
||||||
|
|
||||||
进入解压之后的 bin 目录,执行如下命令来启动
|
进入解压之后的 bin 目录,执行如下命令来启动, 所有启动参数为可选项。
|
||||||
|
|
||||||
```$shell
|
```$shell
|
||||||
sh seata-server.sh -p $LISTEN_PORT -m $MODE(file or db)
|
sh seata-server.sh -p $LISTEN_PORT -m $MODE(file or db) -h $HOST -e $ENV
|
||||||
```
|
```
|
||||||
|
-p seata-server 监听服务端口号
|
||||||
|
-m 存储模式,可选值:file、db。file 用于单点模式,db用于ha模式,当使用db存储模式,需要修改配置中store配置节点的数据库配置,同时在数据库中初始化[global_table、branch_table和
|
||||||
|
lock_table](https://github.com/seata/seata/blob/develop/server/src/main/resources/db_store.sql)
|
||||||
|
-h 用于解决seata-server和业务侧跨网络问题,其配置的host值直接显示到注册中心的服务可用地址host,当跨网络时这里需要配置为公网IP或NATIP,若都在同一局域网则无需配置
|
||||||
|
-e 用于解决多环境配置中心隔离问题
|
||||||
在这个示例中,采用如下命令来启动 Seata Server
|
在这个示例中,采用如下命令来启动 Seata Server
|
||||||
|
|
||||||
```$shell
|
```$shell
|
||||||
|
@ -4,7 +4,7 @@ transport {
|
|||||||
#NIO NATIVE
|
#NIO NATIVE
|
||||||
server = "NIO"
|
server = "NIO"
|
||||||
#enable heartbeat
|
#enable heartbeat
|
||||||
heartbeat = true
|
heartbeat = false
|
||||||
#thread factory for netty
|
#thread factory for netty
|
||||||
thread-factory {
|
thread-factory {
|
||||||
boss-thread-prefix = "NettyBoss"
|
boss-thread-prefix = "NettyBoss"
|
||||||
@ -46,17 +46,22 @@ client {
|
|||||||
retry.times = 30
|
retry.times = 30
|
||||||
}
|
}
|
||||||
report.retry.count = 5
|
report.retry.count = 5
|
||||||
|
tm.commit.retry.count = 1
|
||||||
|
tm.rollback.retry.count = 1
|
||||||
}
|
}
|
||||||
transaction {
|
transaction {
|
||||||
undo.data.validation = true
|
undo.data.validation = true
|
||||||
undo.log.serialization = "jackson"
|
undo.log.serialization = "jackson"
|
||||||
|
undo.log.save.days = 7
|
||||||
|
#schedule delete expired undo_log in milliseconds
|
||||||
|
undo.log.delete.period = 86400000
|
||||||
|
undo.log.table = "undo_log"
|
||||||
}
|
}
|
||||||
|
|
||||||
## metrics settings
|
support {
|
||||||
metrics {
|
## spring
|
||||||
enabled = false
|
spring {
|
||||||
registry-type = "compact"
|
# auto proxy the DataSource bean
|
||||||
# multi exporters use comma divided
|
datasource.autoproxy = false
|
||||||
exporter-list = "prometheus"
|
}
|
||||||
exporter-prometheus-port = 9898
|
|
||||||
}
|
}
|
@ -4,7 +4,7 @@ registry {
|
|||||||
|
|
||||||
nacos {
|
nacos {
|
||||||
serverAddr = "localhost"
|
serverAddr = "localhost"
|
||||||
namespace = "public"
|
namespace = ""
|
||||||
cluster = "default"
|
cluster = "default"
|
||||||
}
|
}
|
||||||
eureka {
|
eureka {
|
||||||
@ -50,8 +50,7 @@ config {
|
|||||||
|
|
||||||
nacos {
|
nacos {
|
||||||
serverAddr = "localhost"
|
serverAddr = "localhost"
|
||||||
namespace = "public"
|
namespace = ""
|
||||||
cluster = "default"
|
|
||||||
}
|
}
|
||||||
consul {
|
consul {
|
||||||
serverAddr = "127.0.0.1:8500"
|
serverAddr = "127.0.0.1:8500"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user