文档
部署流程
1.下载server,修改file.conf,registry.conf;
2.新建seata数据库,创建3张表;
3.client端业务库新建undo_log表;
4.nacos导入配置;
5.client端添加配置;
注意点
1.依赖建议:
<!--seata-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
<version>2.2.1.RELEASE</version>
<exclusions>
<exclusion>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
<version>1.3.0</version>
</dependency>
2.客户端配置
seata.enable-auto-data-source-proxy=false #true为默认,seata代理数据源
3.代码实现
Controller和Service分开写,之前写demo为省事遇到坑。