多数据源支持
1、配置文件
文件地址:/dodo/src/main/webapp/WEB-INF/config/application-context.xml
<bean id="reportDataSource" class="xxxx.xxx">
</bean>
<bean id="multiDataSource" class="com.dodo.common.database.datasource.MultiDataSource">
<property name="targetDataSources">
<map key-type="java.lang.String">
<entry key="defaultDataSource" value-ref="dataSource" />
<entry key="reportDataSource" value-ref="reportDataSourceBean" />
</map>
</property>
<property name="defaultTargetDataSource" ref="dataSource" />
</bean>
2、使用
DbChooser.chooseDb("reportDataSource")