hibernate連線oracle
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools. -->
<!-- 以上幾行所有的hibernate.cfg.xml都相同 -->
<hibernate-configuration>
<session-factory>
<!-- 連線資料庫的使用者名稱 -->
<property name="connection.username">system</property>
<!-- 指定連線資料庫的URL以及要連線的資料庫 -->
<property name="connection.url">
jdbc:oracle:thin:@localhost:1521:college
</property>
<!-- 指定連線的資料庫型別 -->
<property name="dialect">
org.hibernate.dialect.Oracle9Dialect
</property>
<property name="myeclipse.connection.profile">Oracle</property>
<!-- 指定連線資料庫的密碼 -->
<property name="connection.password">password</property>
<!-- 指定連線資料庫的驅動 -->
<property name="connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
</session-factory>
</hibernate-configuration>