Skip to content

imtiaz-m4/spring-multitenant-datasource-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-multitenant-datasource-config (Configure databases for multitenant Spring application)

Implementation Details

Configures target data sources in Spring AbstractRoutingDataSource for database routing.

Tenant configuration is read from Java properties (multitenant.properties) and YAML file (multitenant.yml). Either property / YAML or both can be provided.

Multitenant application need to set CurrentTenant in TenantContextHolder to switch databases automatically.

Features

  • Data source auto configuration from the provided properties or YAML file(s).
  • YAML property source factory implementation

TODO

  • Read individual property file for each tenant and setup multitenant environment

About

Configure databases for multitenant Spring application using properties or YAML file

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages