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. …
spring dm server 官网:http://static.springsource.com/projects/dm-server/1.0.x/programmer-guide/htmlsingle/programmer-guide.html dm Server是一个完全模块化.基于OSGi的Java服务器,为运行企业级Java应用和Spring应用提供强大的灵活性和可靠性.dm Server摒弃了原有的Java EE服务器标准,自然而然地将Spring编程模型展现其中,随之而来的还有一…
Spring:DataSource注入到dao 使用DOS命令创建数据库(Mysql) CREATE DATABASE book DEFAULT CHARACTER SET utf8; CREATE DATABASE book DEFAULT CHARACTER SET utf8; 使用该数据库 use book 建表(name:书名:zuozhe:作者:cbs:出版社) create table myBook( name ), zuozhe ), cbs ) ); 使用IDEA建立Maven项…