Using AbstractRoutingDataSource to dynamically change the database schema/catalog

后端 未结 1 1070
南笙
南笙 2020-12-29 11:05

According to this article, you can use the AbstractRoutingDataSource from Spring Framework to dynamically change the data source used by the application.

However, th

相关标签:
1条回答
  • 2020-12-29 11:41

    I have implemented this approach for 30 datasources and they are currently running in a Production environment without any issues. If you are using JPA you can have a look at my config:

    dynamic-datasource-routing

    0 讨论(0)
提交回复
热议问题