We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
85f9422
mybatis 动态数据源,支持一主多从架构,包含自动事务管理。
默认连接从库,切换主库如下所示。
DynamicDataSourceHolder.setMaster(true, () -> { // 主库切换 System.out.println("切换到主库"); });