双数据源切换问题
<bean id="dynamicDataSource" class="com.aisino.web.util.DynamicDataSource">
<!-- 通过key-value的形式来关联数据源 -->
<property name="targetDataSources">
<map key-type="java.lang.String">
<entry value-ref="cjdataSource" key="cjdataSource"></entry>
<entry value-ref="dataSource51" key="dataSource51"></entry>
</map>
</property>
<property name="defaultTargetDataSource" ref="cjdataSource">
</property>
</bean>
使用动态数据源配置两个数据库,当默认数据源使用cjdataSource时可以实现数据库的切换功能,但是当默认数据源换成dataSource51时程序中不能实现两个数据源的切换功能