0 Star 1 Fork 0

风吹过的绿洲 / muti-datasource-transaction

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

Spring Boot 集成Mybatis实现多数据源

项目提交测试,趁着中当间的这个空档期,把springboot的多数据源配置学习一下,总体来说多数据源配置有两种方式,一种是静态的,一种是动态的。

静态的方式

这种方式需要写多个mapper,事务通过@Transactional(value = "db2TransactionManager")来指定

动态方式

不需要多个mapper接口文件,通过自定义注解选择对应的数据源,事务自动跟随

Empty file

About

spring mybatis 多数据源的静态切换和动态切换 以及事务处理 实践 expand collapse
Java
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/jay763190097/muti-datasource-transaction.git
git@gitee.com:jay763190097/muti-datasource-transaction.git
jay763190097
muti-datasource-transaction
muti-datasource-transaction
master

Search