ssh如何连接多个数据库啊?谁有好点的博文介绍啊?或者粘贴出来。
我用的是Struts1

解决方案 »

  1.   

    看这个,前段时间解答的
    http://topic.csdn.net/u/20091124/21/eee03248-0446-42ea-a63c-afa12636d7dc.html
      

  2.   

    http://topic.csdn.net/u/20091124/11/7e80dc5a-8447-44a5-943f-4b7d615d045b.html
      

  3.   

    <bean id="dataSource0"      class="org.springframework.jdbc.datasource.DriverManagerDataSource">      <property name="driverClassName">         <value>org.hibernate.dialect.OracleDialect</value>      </property>      <property name="url">         <value>jdbc:oracle:thin:@192.168.1.111:1521:orcl</value>      </property>      <property name="username">         <value>bmsdb</value>      </property>      <property name="password">         <value>bmsdb</value>      </property>   </bean>    <bean id="dataSource1"      class="org.springframework.jdbc.datasource.DriverManagerDataSource">      <property name="driverClassName">         <value>org.hibernate.dialect.OracleDialect</value>      </property>      <property name="url">         <value>jdbc:oracle:thin:@192.168.1.191:1521:orcl</value>      </property>      <property name="username">         <value>bmsdb</value>      </property>      <property name="password">         <value>bmsdb</value>      </property>   </bean>    <bean id="dataSource" class="com.hime.util.DynamicDataSource">      <property name="targetDataSources">         <map key-type="java.lang.String">            <entry key="0" value-ref="dataSource0" />            <entry key="1" value-ref="dataSource1" />         </map>      </property>      <property name="defaultTargetDataSource" ref="dataSource0" />   </bean>com.hime.util.DynamicDataSource
    这个类是导入包才有的,还是要自己写的啊?如果是自己写要如何写呢?
      

  4.   

    自己写的,http://topic.csdn.net/u/20091124/11/7e80dc5a-8447-44a5-943f-4b7d615d045b.html这里有完整的代码啊,没看见?