# spring-mybatis-atomikos **Repository Path**: learning_debugging/spring-mybatis-atomikos ## Basic Information - **Project Name**: spring-mybatis-atomikos - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-01-09 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 分布式事务 #### 介绍 此项目是为了学习研究分布式事务,spring中提供了atomikos组件,连接了两个数据源 #### 软件架构 spring+mybatis+atomikos #### 使用说明 需要在pom.xml中引入 ``` org.springframework.boot spring-boot-starter-jta-atomikos ``` 配置文件中添加 > spring.jta.enabled=true ![输入图片说明](https://images.gitee.com/uploads/images/2019/0109/094844_e14ea0da_1074282.png "屏幕截图.png") 当这个方法throw异常后两个数据源的事务都会回滚