Use AbstractRoutingDataSource to dynamicly switch datasources, see http://spring.io/blog/2007/01/23/dynamic-datasource-routing.
PS: note the use of ThreadLocal; may conflict with the use of SqlSessionTemplate.
2024-03-08 23:41:58
Use AbstractRoutingDataSource to dynamicly switch datasources, see http://spring.io/blog/2007/01/23/dynamic-datasource-routing.