seata1.4.2 分布式事务AT模式示例

上传者: liaomingwu | 上传时间: 2022-06-08 21:33:22 | 文件大小: 102KB | 文件类型: ZIP
1. 项目idea+maven+spring-boot+spring-cloud+spring-cloud-alibaba,依赖nacos 2.0.1, mysql,seata server 1.4.2; 2. 示例包括三个服务,订单服务,商品服务,账户服务; 3. 创建订单的同时,需要扣减商品库存,并扣减账户余额,三个操作要么同时成功,要么同时失败。 4. seata server、nacos和mysql环境参数配置,需要根据实际环境进行调整修改;

文件下载

资源详情

[{"title":"( 94 个子文件 102KB ) seata1.4.2 分布式事务AT模式示例","children":[{"title":"seata-server-demo","children":[{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":null,"spread":false},{"title":"java","children":null,"spread":false}],"spread":true},{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"seata-oder-server","children":[{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":[{"title":"application-druid.yml <span style='color:#111;'> 2.00KB </span>","children":null,"spread":false},{"title":"mybatis","children":[{"title":"mybatis-config.xml <span style='color:#111;'> 729B </span>","children":null,"spread":false}],"spread":true},{"title":"bootstrap.yml <span style='color:#111;'> 749B </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"OrderMapper.xml <span style='color:#111;'> 2.31KB </span>","children":null,"spread":false}],"spread":true},{"title":"application.yml <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"platform","children":[{"title":"order","children":[{"title":"dto","children":[{"title":"PlaceOrderRequest.java <span style='color:#111;'> 891B </span>","children":null,"spread":false},{"title":"ReduceStockRequest.java <span style='color:#111;'> 470B </span>","children":null,"spread":false},{"title":"ReduceBalanceRequest.java <span style='color:#111;'> 444B </span>","children":null,"spread":false}],"spread":true},{"title":"entity","children":[{"title":"AjaxResult.java <span style='color:#111;'> 3.90KB </span>","children":null,"spread":false}],"spread":true},{"title":"handler","children":[{"title":"GlobalExceptionHandler.java <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false},{"title":"AjaxResult.java <span style='color:#111;'> 3.90KB </span>","children":null,"spread":false}],"spread":true},{"title":"domain","children":[{"title":"Order.java <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false}],"spread":true},{"title":"controller","children":[{"title":"OrderController.java <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false}],"spread":false},{"title":"OrderApplication.java <span style='color:#111;'> 687B </span>","children":null,"spread":false},{"title":"feign","children":[{"title":"service","children":[{"title":"AccountFeignService.java <span style='color:#111;'> 636B </span>","children":null,"spread":false},{"title":"ProductFeignService.java <span style='color:#111;'> 682B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"service","children":[{"title":"OrderService.java <span style='color:#111;'> 280B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"OrderServiceImpl.java <span style='color:#111;'> 3.46KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"mapper","children":[{"title":"OrderMapper.java <span style='color:#111;'> 257B </span>","children":null,"spread":false}],"spread":false},{"title":"config","children":[{"title":"FeignConfig.java <span style='color:#111;'> 330B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 917B </span>","children":null,"spread":false},{"title":"target","children":[{"title":"classes","children":[{"title":"application-druid.yml <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"com","children":[{"title":"platform","children":[{"title":"order","children":[{"title":"dto","children":[{"title":"PlaceOrderRequest.class <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"ReduceBalanceRequest.class <span style='color:#111;'> 837B </span>","children":null,"spread":false},{"title":"ReduceStockRequest.class <span style='color:#111;'> 843B </span>","children":null,"spread":false}],"spread":true},{"title":"entity","children":[{"title":"AjaxResult$Type.class <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"AjaxResult.class <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"handler","children":[{"title":"AjaxResult$Type.class <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"GlobalExceptionHandler.class <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false},{"title":"AjaxResult.class <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false}],"spread":true},{"title":"domain","children":[{"title":"Order.class <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false}],"spread":false},{"title":"controller","children":[{"title":"OrderController.class <span style='color:#111;'> 1.73KB </span>","children":null,"spread":false}],"spread":false},{"title":"feign","children":[{"title":"service","children":[{"title":"ProductFeignService.class <span style='color:#111;'> 614B </span>","children":null,"spread":false},{"title":"AccountFeignService.class <span style='color:#111;'> 614B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"OrderApplication.class <span style='color:#111;'> 989B </span>","children":null,"spread":false},{"title":"service","children":[{"title":"OrderService.class <span style='color:#111;'> 201B </span>","children":null,"spread":false},{"title":"impl","children":[{"title":"OrderServiceImpl.class <span style='color:#111;'> 3.78KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"mapper","children":[{"title":"OrderMapper.class <span style='color:#111;'> 287B </span>","children":null,"spread":false}],"spread":false},{"title":"config","children":[{"title":"FeignConfig.class <span style='color:#111;'> 692B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"mybatis","children":[{"title":"mybatis-config.xml <span style='color:#111;'> 729B </span>","children":null,"spread":false}],"spread":true},{"title":"bootstrap.yml <span style='color:#111;'> 854B </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"OrderMapper.xml <span style='color:#111;'> 2.31KB </span>","children":null,"spread":false}],"spread":true},{"title":"application.yml <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false}],"spread":true},{"title":"generated-sources","children":[{"title":"annotations","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 3.34KB </span>","children":null,"spread":false},{"title":".idea","children":[{"title":".gitignore <span style='color:#111;'> 184B </span>","children":null,"spread":false},{"title":"misc.xml <span style='color:#111;'> 541B </span>","children":null,"spread":false},{"title":"workspace.xml <span style='color:#111;'> 6.56KB </span>","children":null,"spread":false},{"title":"codeStyles","children":[{"title":"codeStyleConfig.xml <span style='color:#111;'> 153B </span>","children":null,"spread":false},{"title":"Project.xml <span style='color:#111;'> 472B </span>","children":null,"spread":false}],"spread":true},{"title":"compiler.xml <span style='color:#111;'> 646B </span>","children":null,"spread":false},{"title":"jarRepositories.xml <span style='color:#111;'> 872B </span>","children":null,"spread":false}],"spread":true},{"title":"seata-account-server","children":[{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":[{"title":"application-druid.yml <span style='color:#111;'> 2.00KB </span>","children":null,"spread":false},{"title":"mybatis","children":[{"title":"mybatis-config.xml <span style='color:#111;'> 729B </span>","children":null,"spread":false}],"spread":true},{"title":"bootstrap.yml <span style='color:#111;'> 689B </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"AccountMapper.xml <span style='color:#111;'> 881B </span>","children":null,"spread":false}],"spread":true},{"title":"application.yml <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"platform","children":[{"title":"account","children":[{"title":"AccountApplication.java <span style='color:#111;'> 669B </span>","children":null,"spread":false},{"title":"handler","children":[{"title":"GlobalExceptionHandler.java <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false},{"title":"AjaxResult.java <span style='color:#111;'> 3.90KB </span>","children":null,"spread":false}],"spread":false},{"title":"domain","children":[{"title":"Account.java <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false}],"spread":false},{"title":"controller","children":[{"title":"AccountController.java <span style='color:#111;'> 869B </span>","children":null,"spread":false}],"spread":false},{"title":"service","children":[{"title":"impl","children":[{"title":"AccountServiceImpl.java <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false}],"spread":false},{"title":"AccountService.java <span style='color:#111;'> 238B </span>","children":null,"spread":false}],"spread":false},{"title":"mapper","children":[{"title":"AccountMapper.java <span style='color:#111;'> 276B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 712B </span>","children":null,"spread":false}],"spread":true},{"title":"seata-product-server","children":[{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":[{"title":"application-druid.yml <span style='color:#111;'> 2.00KB </span>","children":null,"spread":false},{"title":"mybatis","children":[{"title":"mybatis-config.xml <span style='color:#111;'> 729B </span>","children":null,"spread":false}],"spread":true},{"title":"bootstrap.yml <span style='color:#111;'> 755B </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"ProductMapper.xml <span style='color:#111;'> 977B </span>","children":null,"spread":false}],"spread":true},{"title":"application.yml <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"platform","children":[{"title":"product","children":[{"title":"handler","children":[{"title":"GlobalExceptionHandler.java <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false},{"title":"AjaxResult.java <span style='color:#111;'> 3.90KB </span>","children":null,"spread":false}],"spread":false},{"title":"domain","children":[{"title":"Product.java <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false}],"spread":false},{"title":"ProductApplication.java <span style='color:#111;'> 660B </span>","children":null,"spread":false},{"title":"controller","children":[{"title":"ProductController.java <span style='color:#111;'> 793B </span>","children":null,"spread":false}],"spread":false},{"title":"service","children":[{"title":"impl","children":[{"title":"ProductServiceImpl.java <span style='color:#111;'> 2.14KB </span>","children":null,"spread":false}],"spread":false},{"title":"ProductService.java <span style='color:#111;'> 283B </span>","children":null,"spread":false}],"spread":false},{"title":"mapper","children":[{"title":"ProductMapper.java <span style='color:#111;'> 280B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 711B </span>","children":null,"spread":false},{"title":"target","children":[{"title":"classes","children":[{"title":"application-druid.yml <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"com","children":[{"title":"platform","children":[{"title":"product","children":[{"title":"handler","children":[{"title":"AjaxResult$Type.class <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false},{"title":"GlobalExceptionHandler.class <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"AjaxResult.class <span style='color:#111;'> 2.53KB </span>","children":null,"spread":false}],"spread":false},{"title":"domain","children":[{"title":"Product.class <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false}],"spread":false},{"title":"controller","children":[{"title":"ProductController.class <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":false},{"title":"ProductApplication.class <span style='color:#111;'> 886B </span>","children":null,"spread":false},{"title":"service","children":[{"title":"impl","children":[{"title":"ProductServiceImpl.class <span style='color:#111;'> 2.89KB </span>","children":null,"spread":false}],"spread":false},{"title":"ProductService.class <span style='color:#111;'> 218B </span>","children":null,"spread":false}],"spread":false},{"title":"mapper","children":[{"title":"ProductMapper.class <span style='color:#111;'> 359B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"mybatis","children":[{"title":"mybatis-config.xml <span style='color:#111;'> 729B </span>","children":null,"spread":false}],"spread":true},{"title":"bootstrap.yml <span style='color:#111;'> 858B </span>","children":null,"spread":false},{"title":"mapper","children":[{"title":"ProductMapper.xml <span style='color:#111;'> 977B </span>","children":null,"spread":false}],"spread":false},{"title":"application.yml <span style='color:#111;'> 1.77KB </span>","children":null,"spread":false}],"spread":true},{"title":"generated-sources","children":[{"title":"annotations","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"readme.txt <span style='color:#111;'> 2.33KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明