Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lyflexi/handson-mulit-tenant
多租户组件的设计与实现,剖析动态数据源切换原理、封装starter
https://github.com/lyflexi/handson-mulit-tenant
dynamicdatasource multitenant springboot starter
Last synced: 3 months ago
JSON representation
多租户组件的设计与实现,剖析动态数据源切换原理、封装starter
- Host: GitHub
- URL: https://github.com/lyflexi/handson-mulit-tenant
- Owner: lyflexi
- License: apache-2.0
- Created: 2024-10-21T06:00:31.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-22T09:46:39.000Z (3 months ago)
- Last Synced: 2024-10-23T06:35:22.031Z (3 months ago)
- Topics: dynamicdatasource, multitenant, springboot, starter
- Language: Java
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# handson-mulit-tenant
测试完成
```shell
2024-10-22T08:53:08.158+08:00 INFO 49428 --- [nio-8080-exec-1] c.l.multitenant.utils.TenantContext : 数据源修改======》1844926438923849731
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@726704a3] was not registered for synchronization because synchronization is not active
2024-10-22T08:53:09.882+08:00 INFO 49428 --- [nio-8080-exec-1] c.l.m.d.DynamicDataSourceHolder : >>>>>>>>>>start init data source>>>>>>>>>>
2024-10-22T08:53:10.492+08:00 INFO 49428 --- [nio-8080-exec-1] com.alibaba.druid.pool.DruidDataSource : {dataSource-4,tenant1} inited
JDBC Connection [com.alibaba.druid.pool.DruidStatementConnection@12bda450] will not be managed by Spring
==> Preparing: SELECT id,name FROM user WHERE id=?
==> Parameters: 1(Long)
<== Columns: id, name
<== Row: 1, tenant1
<== Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@726704a3]
```