同一applicationContext.xml中:
1,配置多个数据源(采用连接池c3p0,直接jdbc连也行)
数据源1:dataSource1
<bean id = "dataSource1" class= "com.mchange.v2.c3p0.ComboPooledDataSource" lazy-init = "default">
<property name="driverClass" value = ""/>
...
...
</bean>
数据源2:dataSource2
<bean id = "dataSource2" class= "com.mchange.v2.c3p0.ComboPooledDataSource" lazy-init = "default">
<property name="driverClass" value = ""/>
...
...
</bean>
2, 配置mybatis数据会话管理(sqlSessionFactoryBean)