dynamically change Spring data source
You can use spring’s AbstractRoutingDataSource by extending it and overriding the method determineCurrentLookupKey() that should return the key referencing the datasource’s spring bean to be used. Take a look at this blog article on spring source’s blog which will show you an example of how to use that feature. Basically to answer your questions, what … Read more