mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
fescar -> seata
This commit is contained in:
parent
b9f70bfb8b
commit
ab819291e7
@ -28,7 +28,7 @@ transport {
|
|||||||
}
|
}
|
||||||
service {
|
service {
|
||||||
#vgroup->rgroup
|
#vgroup->rgroup
|
||||||
vgroup_mapping.account-service-fescar-service-group = "default"
|
vgroup_mapping.account-service-seata-service-group = "default"
|
||||||
#only support single node
|
#only support single node
|
||||||
default.grouplist = "127.0.0.1:8091"
|
default.grouplist = "127.0.0.1:8091"
|
||||||
#degrade current not support
|
#degrade current not support
|
||||||
|
@ -28,7 +28,7 @@ transport {
|
|||||||
}
|
}
|
||||||
service {
|
service {
|
||||||
#vgroup->rgroup
|
#vgroup->rgroup
|
||||||
vgroup_mapping.business-service-fescar-service-group = "default"
|
vgroup_mapping.business-service-seata-service-group = "default"
|
||||||
#only support single node
|
#only support single node
|
||||||
default.grouplist = "127.0.0.1:8091"
|
default.grouplist = "127.0.0.1:8091"
|
||||||
#degrade current not support
|
#degrade current not support
|
||||||
|
@ -28,7 +28,7 @@ transport {
|
|||||||
}
|
}
|
||||||
service {
|
service {
|
||||||
#vgroup->rgroup
|
#vgroup->rgroup
|
||||||
vgroup_mapping.order-service-fescar-service-group = "default"
|
vgroup_mapping.order-service-seata-service-group = "default"
|
||||||
#only support single node
|
#only support single node
|
||||||
default.grouplist = "127.0.0.1:8091"
|
default.grouplist = "127.0.0.1:8091"
|
||||||
#degrade current not support
|
#degrade current not support
|
||||||
|
@ -28,7 +28,7 @@ transport {
|
|||||||
}
|
}
|
||||||
service {
|
service {
|
||||||
#vgroup->rgroup
|
#vgroup->rgroup
|
||||||
vgroup_mapping.storage-service-fescar-service-group = "default"
|
vgroup_mapping.storage-service-seata-service-group = "default"
|
||||||
#only support single node
|
#only support single node
|
||||||
default.grouplist = "127.0.0.1:8091"
|
default.grouplist = "127.0.0.1:8091"
|
||||||
#degrade current not support
|
#degrade current not support
|
||||||
|
@ -51,7 +51,7 @@ public class GlobalTransactionAutoConfiguration {
|
|||||||
String txServiceGroup = seataProperties.getTxServiceGroup();
|
String txServiceGroup = seataProperties.getTxServiceGroup();
|
||||||
|
|
||||||
if (StringUtils.isEmpty(txServiceGroup)) {
|
if (StringUtils.isEmpty(txServiceGroup)) {
|
||||||
txServiceGroup = applicationName + "-fescar-service-group";
|
txServiceGroup = applicationName + "-seata-service-group";
|
||||||
seataProperties.setTxServiceGroup(txServiceGroup);
|
seataProperties.setTxServiceGroup(txServiceGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||||||
@ConfigurationProperties("spring.cloud.alibaba.seata")
|
@ConfigurationProperties("spring.cloud.alibaba.seata")
|
||||||
public class SeataProperties {
|
public class SeataProperties {
|
||||||
|
|
||||||
// todo support config Fescar server information
|
// todo support config Seata server information
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Seata tx service group.default is ${spring.application.name}-fescar-service-group.
|
* Seata tx service group.default is ${spring.application.name}-seata-service-group.
|
||||||
*/
|
*/
|
||||||
private String txServiceGroup;
|
private String txServiceGroup;
|
||||||
|
|
||||||
|
@ -68,9 +68,9 @@ public class SeataFeignClient implements Client {
|
|||||||
Map<String, Collection<String>> headers = new HashMap<>(MAP_SIZE);
|
Map<String, Collection<String>> headers = new HashMap<>(MAP_SIZE);
|
||||||
headers.putAll(request.headers());
|
headers.putAll(request.headers());
|
||||||
|
|
||||||
List<String> fescarXid = new ArrayList<>();
|
List<String> seataXid = new ArrayList<>();
|
||||||
fescarXid.add(xid);
|
seataXid.add(xid);
|
||||||
headers.put(RootContext.KEY_XID, fescarXid);
|
headers.put(RootContext.KEY_XID, seataXid);
|
||||||
|
|
||||||
return Request.create(request.method(), request.url(), headers, request.body(),
|
return Request.create(request.method(), request.url(), headers, request.body(),
|
||||||
request.charset());
|
request.charset());
|
||||||
|
@ -71,9 +71,9 @@ public class SeataLoadBalancerFeignClient extends LoadBalancerFeignClient {
|
|||||||
Map<String, Collection<String>> headers = new HashMap<>(MAP_SIZE);
|
Map<String, Collection<String>> headers = new HashMap<>(MAP_SIZE);
|
||||||
headers.putAll(request.headers());
|
headers.putAll(request.headers());
|
||||||
|
|
||||||
List<String> fescarXid = new ArrayList<>();
|
List<String> seataXid = new ArrayList<>();
|
||||||
fescarXid.add(xid);
|
seataXid.add(xid);
|
||||||
headers.put(RootContext.KEY_XID, fescarXid);
|
headers.put(RootContext.KEY_XID, seataXid);
|
||||||
|
|
||||||
return Request.create(request.method(), request.url(), headers, request.body(),
|
return Request.create(request.method(), request.url(), headers, request.body(),
|
||||||
request.charset());
|
request.charset());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user