服务端 seata-server 1.2 正确配置:
<dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-seata</artifactId> <version>2.2.0.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.2.0</version> </dependency>1.2版本不需要在客户端添加file.conf和registry.conf文件,只需要在.yml中配置
正确配置:
@GlobalTransactional(rollbackFor = Exception.class)不要加name属性,否则事务不起作用
