添加配置中心和seata依赖
This commit is contained in:
18
pom.xml
18
pom.xml
@ -73,6 +73,24 @@
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Seata分布式事务依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Seata数据源代理 -->
|
||||
<dependency>
|
||||
<groupId>io.seata</groupId>
|
||||
<artifactId>seata-spring-boot-starter</artifactId>
|
||||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<!-- <repositories>-->
|
||||
|
@ -16,6 +16,8 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.110.231:8848
|
||||
namespace: seata
|
||||
group: SEATA_GROUP
|
||||
aop:
|
||||
auto: true #开启spring的aop配置
|
||||
proxy-target-class: true
|
||||
@ -84,6 +86,7 @@ spring:
|
||||
# master: mymaster
|
||||
# nodes: 192.168.110.231:26379
|
||||
host: 192.168.110.231
|
||||
# host: localhost
|
||||
port: 6379
|
||||
password: pass
|
||||
database:
|
||||
@ -160,10 +163,35 @@ ribbon:
|
||||
MaxAutoRetries: 1 #对当前实例的重试次数
|
||||
MaxAutoRetriesNextServer: 2 #切换实例的重试次数 1
|
||||
|
||||
# Seata分布式事务配置
|
||||
seata:
|
||||
application-id: ${spring.application.name}
|
||||
tx-service-group: sys-manager-ebtp-project-service-group
|
||||
service:
|
||||
vgroup-mapping:
|
||||
sys-manager-ebtp-project-service-group: default
|
||||
grouplist:
|
||||
default: 192.168.110.231:8091
|
||||
registry:
|
||||
type: nacos
|
||||
nacos:
|
||||
application: seata-server
|
||||
server-addr: 192.168.110.231:8848
|
||||
group: SEATA_GROUP
|
||||
namespace: seata
|
||||
config:
|
||||
type: nacos
|
||||
nacos:
|
||||
server-addr: 192.168.110.231:8848
|
||||
namespace: seata
|
||||
group: SEATA_GROUP
|
||||
data-id: seataServer.properties
|
||||
enable-auto-data-source-proxy: true
|
||||
|
||||
mconfig:
|
||||
swagger-ui-open: true
|
||||
exception-handle-enabled: true
|
||||
seata-open-enabled: false
|
||||
seata-open-enabled: true
|
||||
work-id: 1 #终端ID
|
||||
datacenter-id: 1 #数据中心ID
|
||||
host-name: http://10.238.25.112/
|
||||
|
8
src/main/resources/bootstrap.yml
Normal file
8
src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,8 @@
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: 192.168.110.231:8848
|
||||
file-extension: yml
|
||||
namespace: seata
|
||||
group: SEATA_GROUP
|
Reference in New Issue
Block a user