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

做贸易 公司网站放哪里数据分析师报考官网

做贸易 公司网站放哪里,数据分析师报考官网,2022年没封网站直接进入,做餐厅网站的需求分析目录 环境准备 1.下载seata安装包 2.修改配置文件 3.准备seata所需配置文件 4.初始化seata所需数据库 5.运行seata 服务准备 分布式事务测试 环境准备 1.下载seata安装包 Seata-Server下载 | Apache Seata 本地环境我们选择稳定版的二进制下载。 下载之后解压到指定目录…

目录

环境准备

1.下载seata安装包

2.修改配置文件

3.准备seata所需配置文件

 4.初始化seata所需数据库

 5.运行seata

服务准备

分布式事务测试

环境准备

1.下载seata安装包

Seata-Server下载 | Apache Seata

本地环境我们选择稳定版的二进制下载。

下载之后解压到指定目录

2.修改配置文件

所在目录:conf/application.yml

完整的配置可参考如下内容:

server:port: 7091spring:application:name: seata-serverlogging:config: classpath:logback-spring.xmlfile:path: ${log.home:${user.home}/logs/seata}extend:logstash-appender:destination: 127.0.0.1:4560kafka-appender:bootstrap-servers: 127.0.0.1:9092topic: logback_to_logstashconsole:user:username: seatapassword: seata
seata:config:type: nacosnacos: server-addr: 127.0.0.1:8848group: SEATA_GROUPcontext-path:data-id: seataServer.propertiesregistry:type: nacosnacos:application: seata-serverserver-addr: 127.0.0.1:8848group: SEATA_GROUPcluster: defaultsecurity:secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017tokenValidityInMilliseconds: 1800000ignore:urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/metadata/v1/**

3.准备seata所需配置文件

这里我们选择的是nacos存储,对应配置需要添加到nacos中 

完整配置内容如下:

#For details about configuration items, see https://seata.io/zh-cn/docs/user/configurations.html
#Transport configuration, for client and server
# socket通信方式, 公共部分
transport.type=TCP
transport.server=NIO
transport.heartbeat=true
transport.enableTmClientBatchSendRequest=false
transport.enableRmClientBatchSendRequest=true
transport.enableTcServerBatchSendResponse=false
transport.rpcRmRequestTimeout=30000
transport.rpcTmRequestTimeout=30000
transport.rpcTcRequestTimeout=30000
transport.threadFactory.bossThreadPrefix=NettyBoss
transport.threadFactory.workerThreadPrefix=NettyServerNIOWorker
transport.threadFactory.serverExecutorThreadPrefix=NettyServerBizHandler
transport.threadFactory.shareBossWorker=false
transport.threadFactory.clientSelectorThreadPrefix=NettyClientSelector
transport.threadFactory.clientSelectorThreadSize=1
transport.threadFactory.clientWorkerThreadPrefix=NettyClientWorkerThread
transport.threadFactory.bossThreadSize=1
transport.threadFactory.workerThreadSize=default
transport.shutdown.wait=3
transport.serialization=seata
transport.compressor=none#首先应用程序(客户端)中配置了事务分组,若应用程序是SpringBoot则通过配置seata.tx-service-group=[事务分组配置项]
# 事务群组,service.vgroupMapping.[事务分组配置项]=TC集群的名称
#Transaction routing rules configuration, only for the client
service.vgroupMapping.default_tx_group=default
#If you use a registry, you can ignore it
service.default.grouplist=127.0.0.1:8091
service.enableDegrade=false
service.disableGlobalTransaction=falseclient.metadataMaxAgeMs=30000
#Transaction rule configuration, only for the client
client.rm.asyncCommitBufferLimit=10000
client.rm.lock.retryInterval=10
client.rm.lock.retryTimes=30
client.rm.lock.retryPolicyBranchRollbackOnConflict=true
client.rm.reportRetryCount=5
client.rm.tableMetaCheckEnable=true
client.rm.tableMetaCheckerInterval=60000
client.rm.sqlParserType=druid
client.rm.reportSuccessEnable=false
client.rm.sagaBranchRegisterEnable=false
client.rm.sagaJsonParser=fastjson
client.rm.tccActionInterceptorOrder=-2147482648
client.rm.sqlParserType=druid
client.tm.commitRetryCount=5
client.tm.rollbackRetryCount=5
client.tm.defaultGlobalTransactionTimeout=60000
client.tm.degradeCheck=false
client.tm.degradeCheckAllowTimes=10
client.tm.degradeCheckPeriod=2000
client.tm.interceptorOrder=-2147482648
client.undo.dataValidation=true
client.undo.logSerialization=jackson
client.undo.onlyCareUpdateColumns=true
server.undo.logSaveDays=7
server.undo.logDeletePeriod=86400000
client.undo.logTable=undo_log
client.undo.compress.enable=true
client.undo.compress.type=zip
client.undo.compress.threshold=64k
#For TCC transaction mode
tcc.fence.logTableName=tcc_fence_log
tcc.fence.cleanPeriod=1h
# You can choose from the following options: fastjson, jackson, gson
tcc.contextJsonParserType=fastjson#Log rule configuration, for client and server
log.exceptionRate=100#Transaction storage configuration, only for the server. The file, db, and redis configuration values are optional.
store.mode=db
store.lock.mode=db
store.session.mode=db
#Used for password encryption#These configurations are required if the `store mode` is `db`. If `store.mode,store.lock.mode,store.session.mode` are not equal to `db`, you can remove the configuration block.
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.jdbc.Driver
store.db.url=jdbc:mysql://127.0.0.1:3306/seata2?useUnicode=true&rewriteBatchedStatements=true
store.db.user=root
store.db.password=root
store.db.minConn=5
store.db.maxConn=30
store.db.globalTable=global_table
store.db.branchTable=branch_table
store.db.distributedLockTable=distributed_lock
store.db.queryLimit=100
store.db.lockTable=lock_table
store.db.maxWait=5000#Transaction rule configuration, only for the server
server.recovery.committingRetryPeriod=1000
server.recovery.asynCommittingRetryPeriod=1000
server.recovery.rollbackingRetryPeriod=1000
server.recovery.timeoutRetryPeriod=1000
server.maxCommitRetryTimeout=-1
server.maxRollbackRetryTimeout=-1
server.rollbackRetryTimeoutUnlockEnable=false
server.distributedLockExpireTime=10000
server.session.branchAsyncQueueSize=5000
server.session.enableBranchAsyncRemove=false
server.enableParallelRequestHandle=true
server.enableParallelHandleBranch=falseserver.raft.cluster=127.0.0.1:7091,127.0.0.1:7092,127.0.0.1:7093
server.raft.snapshotInterval=600
server.raft.applyBatch=32
server.raft.maxAppendBufferSize=262144
server.raft.maxReplicatorInflightMsgs=256
server.raft.disruptorBufferSize=16384
server.raft.electionTimeoutMs=2000
server.raft.reporterEnabled=false
server.raft.reporterInitialDelay=60
server.raft.serialization=jackson
server.raft.compressor=none
server.raft.sync=true#Metrics configuration, only for the server
metrics.enabled=false
metrics.registryType=compact
metrics.exporterList=prometheus
metrics.exporterPrometheusPort=9898

 4.初始化seata所需数据库

脚本目录:/script/server/db/mysql.sql

-- -------------------------------- The script used when storeMode is 'db' --------------------------------
-- the table to store GlobalSession data
CREATE TABLE IF NOT EXISTS `global_table`
(`xid`                       VARCHAR(128) NOT NULL,`transaction_id`            BIGINT,`status`                    TINYINT      NOT NULL,`application_id`            VARCHAR(32),`transaction_service_group` VARCHAR(32),`transaction_name`          VARCHAR(128),`timeout`                   INT,`begin_time`                BIGINT,`application_data`          VARCHAR(2000),`gmt_create`                DATETIME,`gmt_modified`              DATETIME,PRIMARY KEY (`xid`),KEY `idx_status_gmt_modified` (`status` , `gmt_modified`),KEY `idx_transaction_id` (`transaction_id`)
) ENGINE = InnoDBDEFAULT CHARSET = utf8mb4;-- the table to store BranchSession data
CREATE TABLE IF NOT EXISTS `branch_table`
(`branch_id`         BIGINT       NOT NULL,`xid`               VARCHAR(128) NOT NULL,`transaction_id`    BIGINT,`resource_group_id` VARCHAR(32),`resource_id`       VARCHAR(256),`branch_type`       VARCHAR(8),`status`            TINYINT,`client_id`         VARCHAR(64),`application_data`  VARCHAR(2000),`gmt_create`        DATETIME(6),`gmt_modified`      DATETIME(6),PRIMARY KEY (`branch_id`),KEY `idx_xid` (`xid`)
) ENGINE = InnoDBDEFAULT CHARSET = utf8mb4;-- the table to store lock data
CREATE TABLE IF NOT EXISTS `lock_table`
(`row_key`        VARCHAR(128) NOT NULL,`xid`            VARCHAR(128),`transaction_id` BIGINT,`branch_id`      BIGINT       NOT NULL,`resource_id`    VARCHAR(256),`table_name`     VARCHAR(32),`pk`             VARCHAR(36),`status`         TINYINT      NOT NULL DEFAULT '0' COMMENT '0:locked ,1:rollbacking',`gmt_create`     DATETIME,`gmt_modified`   DATETIME,PRIMARY KEY (`row_key`),KEY `idx_status` (`status`),KEY `idx_branch_id` (`branch_id`),KEY `idx_xid` (`xid`)
) ENGINE = InnoDBDEFAULT CHARSET = utf8mb4;CREATE TABLE IF NOT EXISTS `distributed_lock`
(`lock_key`       CHAR(20) NOT NULL,`lock_value`     VARCHAR(20) NOT NULL,`expire`         BIGINT,primary key (`lock_key`)
) ENGINE = InnoDBDEFAULT CHARSET = utf8mb4;INSERT INTO `distributed_lock` (lock_key, lock_value, expire) VALUES ('AsyncCommitting', ' ', 0);
INSERT INTO `distributed_lock` (lock_key, lock_value, expire) VALUES ('RetryCommitting', ' ', 0);
INSERT INTO `distributed_lock` (lock_key, lock_value, expire) VALUES ('RetryRollbacking', ' ', 0);
INSERT INTO `distributed_lock` (lock_key, lock_value, expire) VALUES ('TxTimeoutCheck', ' ', 0);

 5.运行seata

windows下执行bin目录下的.bat文件

访问:http://localhost:7091/#/login,设置的用户名和密码为:seata/seata

可正常访问并出现如下界面,说明seata服务端启动成功。

服务准备

参考源码地址:gui_lab: 乌龟的学习实验室 - Gitee.com

seata官方文档:快速启动 | Apache Seata

seata实验室中,用了订单服务和库存服务来模拟分布式事务问题,主要是帮助大家学会怎么在实际项目当中落地seata分布式事务解决方案。

业务代码中只需要一个核心的注解@GlobalTransactional即可。

分布式事务测试

测试分布式事务提交,访问:

​​​​​​http://localhost:9091/order/placeOrder/commit

测试分布式事务回滚,访问:

http://localhost:9091/order/placeOrder/rollback


文章转载自:
http://ringtaw.crhd.cn
http://wattmeter.crhd.cn
http://terezina.crhd.cn
http://insectology.crhd.cn
http://philhellenist.crhd.cn
http://whoremonger.crhd.cn
http://pothead.crhd.cn
http://zarape.crhd.cn
http://gnatcatcher.crhd.cn
http://mantic.crhd.cn
http://rhetorical.crhd.cn
http://discutient.crhd.cn
http://moscow.crhd.cn
http://charbroil.crhd.cn
http://honorary.crhd.cn
http://vitrify.crhd.cn
http://fiard.crhd.cn
http://inquilinism.crhd.cn
http://stalemate.crhd.cn
http://rotodyne.crhd.cn
http://gammon.crhd.cn
http://tubful.crhd.cn
http://jo.crhd.cn
http://grabble.crhd.cn
http://doric.crhd.cn
http://willing.crhd.cn
http://nosepiece.crhd.cn
http://frigidaria.crhd.cn
http://autokinetic.crhd.cn
http://brocatelle.crhd.cn
http://chondrocranium.crhd.cn
http://spectrophotoelectric.crhd.cn
http://ottawa.crhd.cn
http://cobelligerent.crhd.cn
http://prosodeme.crhd.cn
http://streaky.crhd.cn
http://underthrust.crhd.cn
http://nightshirt.crhd.cn
http://demisemiquaver.crhd.cn
http://gpd.crhd.cn
http://thermobarograph.crhd.cn
http://cansure.crhd.cn
http://unfoiled.crhd.cn
http://mnemosyne.crhd.cn
http://hametz.crhd.cn
http://ertebolle.crhd.cn
http://dekagram.crhd.cn
http://gingivitis.crhd.cn
http://slimicide.crhd.cn
http://chokebore.crhd.cn
http://dart.crhd.cn
http://typescript.crhd.cn
http://pronase.crhd.cn
http://poseuse.crhd.cn
http://logorrhea.crhd.cn
http://grissino.crhd.cn
http://retrofit.crhd.cn
http://recalculation.crhd.cn
http://undertread.crhd.cn
http://signaling.crhd.cn
http://dinornis.crhd.cn
http://misbeliever.crhd.cn
http://flectional.crhd.cn
http://shimonoseki.crhd.cn
http://patronage.crhd.cn
http://enterograph.crhd.cn
http://eyelash.crhd.cn
http://vlaanderen.crhd.cn
http://nonconform.crhd.cn
http://clavicornia.crhd.cn
http://phidian.crhd.cn
http://potamology.crhd.cn
http://invite.crhd.cn
http://viverrine.crhd.cn
http://homolecithal.crhd.cn
http://gelatiniferous.crhd.cn
http://gimcrackery.crhd.cn
http://huggable.crhd.cn
http://suprapersonal.crhd.cn
http://erotica.crhd.cn
http://chatelaine.crhd.cn
http://unshapely.crhd.cn
http://uterine.crhd.cn
http://encyclopedize.crhd.cn
http://vietnam.crhd.cn
http://amperage.crhd.cn
http://sharecrop.crhd.cn
http://oolite.crhd.cn
http://ecr.crhd.cn
http://heedfully.crhd.cn
http://cleistogamy.crhd.cn
http://grandma.crhd.cn
http://unquestionably.crhd.cn
http://poulard.crhd.cn
http://ephesine.crhd.cn
http://nonsingular.crhd.cn
http://creatinuria.crhd.cn
http://splashplate.crhd.cn
http://amalekite.crhd.cn
http://cosmologic.crhd.cn
http://www.15wanjia.com/news/57601.html

相关文章:

  • 网站建设分析图国内搜索引擎
  • 承接网站建设 优帮云sem竞价是什么意思
  • 做网站租服务器一年多少钱网址大全qq浏览器
  • 办理网站域名加急备案新手怎么开始做电商
  • 网站建设深圳公司深圳优化公司哪家好
  • 汕头企业做网站外贸网站平台都有哪些 免费的
  • 满城区建设局网站网络营销服务的特点有哪些
  • 代理注册公司排名杭州seo网站建设靠谱
  • 互联网舆情信息中心关于seo的行业岗位有哪些
  • 制作网站建设的游戏行业seo整站优化
  • 网站建设的代理百度导航官网
  • 网站建设找实体还是淘宝百度极速版免费下载安装
  • 杭州模板网站制作如何推广自己的微信号
  • 动漫做暧视频在线观看网站自己如何制作一个网页
  • 四川新正路桥建设工程有限公司网站seo优化思路
  • 免费做的英文网站全网线报 实时更新
  • wordpress设置留言板谷歌aso优化
  • 沈阳黑酷做网站建设优化公司怎么样互联网营销策划是做什么的
  • 网站建设网站制作网站设计seo顾问服务四川
  • 网站怎么做访问量统计北京建站公司
  • 济南公司注册网站建设google网页版
  • php房产中介网站源码福州关键词搜索排名
  • 网站开发系统的可行性研究报告百度推广运营专员
  • 注册网站合集邢台网站公司
  • 怎么做批量的网站检查网络推广员要怎么做
  • 龙川做网站的进行网络推广
  • 为什么做网站推广seo工资服务
  • 邢台网站建设免费做网站排名长沙网站推广排名
  • 沈阳建设网站哪家好新站快速收录
  • 网站建设需要几个人整站优化cms