当前位置: 首页 > news >正文

seata部署与集成

一、下载seata server

https://github.com/apache/incubator-seata/releases 下载你需要的版本

二、到seata-server\script\server\db  目录下,获取对应数据库的sql这里我用mysql

新建seata库,执行sql

三、到seata-server\conf 目录下,修改application.yml,集成nacos

server:port: 7091spring:application:name: seata-serverlogging:config: classpath:logback-spring.xmlfile:path: ${log.home:${user.home}/logs/seata}extend:logstash-appender:# off by defaultenabled: falsedestination: 127.0.0.1:4560kafka-appender:# off by defaultenabled: falsebootstrap-servers: 127.0.0.1:9092topic: logback_to_logstashproducer:acks: 0linger-ms: 1000max-block-ms: 0metric-appender:# off by defaultenabled: falseseata:config:# support: nacos, consul, apollo, zk, etcd3type: nacosnacos:server-addr: 192.168.*****:8848namespace: seatagroup: SEATA_GROUPcontext-path:username: nacospassword: *****data-id: seata-server.ymlregistry:# support: nacos, eureka, redis, zk, consul, etcd3, sofatype: nacospreferred-networks: 30.240.*nacos:application: seata-serverserver-addr: 192.168.*****:8848group: SEATA_GROUPnamespace: seatacluster: seatacontext-path:##1.The following configuration is for the open source version of Nacosusername: nacospassword: *****

四、到nacos相应的namespace下建立对应配置文件seata-server.yml

store:mode: dbdb:datasource: druiddbType: mysqldriverClassName: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://192.168.*******:3306/seata?allowPublicKeyRetrieval=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghaiuser: *******password: *******minConn: 10maxConn: 100globalTable: global_tablebranchTable: branch_tablelockTable: lock_tabledistributedLockTable: distributed_lockqueryLimit: 1000maxWait: 5000metrics:enabled: falseregistry-type: compactexporter-list: prometheusexporter-prometheus-port: 9898
transport:rpc-tc-request-timeout: 15000enable-tc-server-batch-send-response: falseshutdown:wait: 3thread-factory:boss-thread-prefix: NettyBossworker-thread-prefix: NettyServerNIOWorkerboss-thread-size: 1
security:secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017tokenValidityInMilliseconds: 1800000ignore:urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/metadata/v1/**service:vgroupMapping:default_tx_group: seata

五、Springboot服务yml文件引入配置

  config:import:- nacos:seata-client:config.yml?group=${spring.profiles.active}

在nacos建立对应文件seata-client:config.yml

seata:enabled: trueapplication-id: ${spring.application.name}# 需与nacos配置的vgroupMapping一致tx-service-group: default_tx_groupregistry:type: nacosnacos:server-addr: 192.168.******:8848application: seata-serverusername: nacospassword: ******group: SEATA_GROUPnamespace: seataconfig:type: nacosnacos:server-addr: 192.168.******:8848username: nacospassword: ******group: SEATA_GROUPdata-id: seata-server.ymlnamespace: seata

http://www.dtcms.com/a/406961.html

相关文章:

  • ORM框架Java持久化层使用手册(mybatis,mybatisplus,jpa等)
  • 大型企业网站建设方案seo排名优化软件有用
  • 数据驱动下的高维数据破局术:降维处理的技术实战、选型指南与方法论沉淀
  • Java按顺序提取Word内容(文本+数学公式)
  • Python快速入门专业版(四十五):Python类的属性:实例属性、类属性与属性访问控制(封装特性)
  • 软考~系统规划与管理师考试——论文—— IT 服务监督管理专题 —— 范文
  • 深度解析社区运营中的技术实践:从数据驱动到智能优化的全面探索
  • 虚拟主机WordPress建站苏州网站建设如何选择
  • hello算法笔记 03
  • 沂水网站开发付钱做编程题目的网站
  • C++笔记(基础)string基础
  • 雨晨Win11PE_25H2_26200.6588紧急维护系统
  • 【鸿蒙心迹】摸蓝图,打地基
  • 小型教育网站的开发建设开题报告建设网咨询
  • 二级网站建设情况说明汕尾网站网站建设
  • 从零起步学习Redis || 第二章:Redis中数据类型的深层剖析讲解(下)
  • C++设计模式_创建型模式_原型模式Prototype
  • 简单直播TV1.4.3 | 一个软件观看四大平台,免去多应用切换烦恼
  • 设计模式-3D引擎中的设计模式
  • Linux安装配置Redis 7.2.3教程
  • 山西省城乡住房建设厅网站网站建设需要多少钱小江
  • 网站建设背景需要写些什么考研哪个培训机构比较好
  • JavaEE 初阶第二十五期:IP协议,网络世界的 “身份通行证”(一)
  • 有一个做炫舞官网活动的网站企业邮箱注册申请126
  • 服务器跨域问题CORS的解决
  • MyBatis进行级联查询
  • MySQL8.0.26-Linux版安装
  • 济南网站建设_美叶网络网址域名查询
  • 深入了解linux网络—— UDP网络通信
  • 招商加盟的网站应该怎么做宝坻做网站哪家好