java连接 ORACLE DB2 MYSQL

<!-- //////////////////// Data source ////////////////////// -->
<!-- Oracle -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thin:@192.168.0.1:1521:oradb</value>
</property>
<property name="username">
<value>admin</value>
</property>
<property name="password">
<value>111111</value>
</property>
</bean>
<!--
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/jdbc/audit2</value>
</property>
</bean>
-->
<!-- DB2
<bean id="dataSource"
            class="org.apache.commons.dbcp.BasicDataSource"
            destroy-method="close">
        <property name="driverClassName">
            <value>COM.ibm.db2.jdbc.app.DB2Driver</value>
        </property>
        <property name="url">
            <value>jdbc:db2:BTCJDB</value>
        </property>
        <property name="username">
            <value>db2admin</value>
        </property>
        <property name="password">
            <value>admin</value>
        </property>
    </bean>
-->
<!-- MySQL
<bean id="dataSource"
            class="org.apache.commons.dbcp.BasicDataSource"
            destroy-method="close">
        <property name="driverClassName">
            <value>org.gjt.mm.mysql.Driver</value>
        </property>
        <property name="url">
            <value>jdbc:mysql://localhost/test</value>
        </property>
        <property name="username">
            <value>root</value>
        </property>
        <property name="password">
            <value>1111</value>
        </property>
    </bean>
-->

你可能感兴趣的:(java,oracle,mysql,jdbc,db2)