Spring Dynamic DataSource Routing

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.
 
 
posted @ 2015-12-10 12:11  赫尔修斯  阅读(673)  评论(0编辑  收藏  举报