<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">


<hibernate-configuration>
	<session-factory name="foo">
	<!--数据库连接配置4项  -->
		<!-- 数据库连接字符串 -->
		<property name="connection.url">jdbc:oracle:thin:@127.0.0.1:1521:orcl</property>
		<!-- 数据库用户名 -->
		<property name="connection.username">scott</property>
		<!-- 数据库密码-->
		<property name="connection.password">tiger</property>
		<!-- 数据库连接驱动-->
		<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
		<!--数据库方言(数据类型的配置)  -->
		<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
		<!--数据库相关配置  -->
		<property name="show_sql">true</property>
		<!--格式化  -->
		<property name="format_sql">true</property>
		<!--映射,有几张表就配置几个映射  -->
		<mapping resource="org/hibernate_one/entity/Dept.hbm.xml"/>
		
	</session-factory>
</hibernate-configuration>