fix:解决版本问题

上级 fbc18c7b
......@@ -13,10 +13,11 @@ public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> impleme
@Autowired
private PersonMapper personMapper;
// @DS(value ="ali-ds" )
// @DS(value ="ali-ds" )
@Override
public Person savePerson(Person person) {
personMapper.insert(person);
final int i = 1 / 0;
return person;
}
}
......@@ -6,6 +6,7 @@ import com.kwan.springbootkwan.entity.User;
import com.kwan.springbootkwan.mapper.UserMapper;
import com.kwan.springbootkwan.service.IPersonService;
import com.kwan.springbootkwan.service.IUserService;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -39,6 +40,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
return userByName;
}
@GlobalTransactional
@Override
public User saveUser(User user) {
userMapper.insert(user);
......
......@@ -57,12 +57,13 @@ spring:
seata:
application-id: spring-boot-name
tx-service-group: spring-boot-name-group
tx-service-group: my-tx-group
service:
vgroup-mapping:
spring-boot-demo-group: default
my-tx-group: seata-server
grouplist:
default: 127.0.0.1:8091
seata-server: 127.0.0.1:8091
enabled: true
......
service {
#事务组名称
vgroup_mapping.my-tx-group ="seata-server"
default.grouplist ="127.0.0.1:8091'
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册