spring oracle,mysql bean datasource

<beans:bean id="dataSource" destroy-method="close">
          <!--<beans:property name="driverClassName" value="com.mysql.jdbc.Driver" />
          <beans:property name="url" value="jdbc:mysql://$host:$port/$dbname" />
          <beans:property name="username" value="$user" />
          <beans:property name="password" value="$pass" /> -->

          <beans:property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
          <beans:property name="url" value="jdbc:oracle:thin:@$host:$port/$SID" />
          <beans:property name="username" value="$user" />
          <beans:property name="password" value="$pass" />
</beans:bean>

Related posts:

This entry was posted in java. Bookmark the permalink.