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.
标签:log nbsp routing conf bsp template dynamic ring rac
Use AbstractRoutingDataSource to dynamicly switch datasources, see http://spring.io/blog/2007/01/23/dynamic-datasource-routing.
Spring Dynamic DataSource Routing
标签:log nbsp routing conf bsp template dynamic ring rac
原文地址:https://www.cnblogs.com/huangzejun/p/8143837.html