hibernate.cfg.xml配置文件

时间:2014-05-21 10:57:22   收藏:0   阅读:287
<span style="font-size:18px;"><!DOCTYPE hibernate-configuration PUBLIC

"-//Hibernate/Hibernate Configuration DTD 3.0//EN"

"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>
	<property name="myeclipse.connection.profile">jdbc</property>
	<property name="connection.url">jdbc:oracle:thin:@localhost: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.Oracle9Dialect</property>

	<!-- 是否通过映射文件来自动创建数据表: -->
	<property name="hibernate.hbm2ddl.auto">update</property>
	<!-- 在运行的时候是否把sql语句打到控制台上去 -->
	<property name="hibernate.show_sql">true</property>
	<!-- 格式化SQL语句,以便能观察更加清晰 -->
	<property name="hibernate.format_sql">true</property>
	<!-- 映射文件 -->
	<mapping resource="com/hibernate/domain/Person.hbm.xml" />

</session-factory>

</hibernate-configuration></span>


hibernate.cfg.xml配置文件,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!