动态数据源切换错误
<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时不能实现动态切换时为什么呢 求解
<!-- 通过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时不能实现动态切换时为什么呢 求解
...全文
相关推荐
VC 动态切换ODBC数据源的例子.rar
VC 创建动态ODBC数据源的例子,可以在程序中动态切换数据源,为程序调用数据提供方便。
SpringBoot+Atomikos+动态多数据源+事务+2种切换数据源的方式
SpringBoot+Atomikos+动态多数据源+事务+2种切换数据源的方式 SpringBoot+Atomikos+动态多数据源+事务+2种切换数据源的方式
springboot+mybatis动态切换数据源完整项目架构
springboot+mybatis动态切换数据源完整项目架构,支持mysql与oracle,下载配置数据库信息即可测试。
动态切换多数据源
javaWeb 多数据源demo
多数据源配置代码实例.zip
多数据源配置代码实例


Web 开发
