<?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-configuration>
<session-factory>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.url">jdbc:oracle:thin:@127.0.0.1:1521:orcl</property>
<property name="connection.username">student</property>
<property name="connection.password">student</property>
<property name="current_session_context_class">thread</property>
<property name="connection.driver_class">oracle.jdbc.OracleDriver</property>
<property name="myeclipse.connection.profile">student</property>
<!--显示sql语句 -->
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<!--自动创建表 -->
<!--<property name="hbm2ddl.auto">create</property>-->
<!--映射文件 -->
<mapping
resource="cn/bdqn/studentInfo/entity/Student.hbm.xml" />
<mapping
resource="cn/bdqn/studentInfo/entity/Teacher.hbm.xml" />
</session-factory>
</hibernate-configuration>hibernate正向生成数据库表以及配置——hibernate.cfg.xml
Hibernate配置详解
最新推荐文章于 2017-09-03 11:27:00 发布
本文详细介绍了Hibernate配置文件的具体内容,包括数据库连接属性、显示SQL语句设置及表的自动创建等特性,并指定了Oracle数据库方言及具体连接参数。此外,还列出了两个实体类的映射文件。
1267

被折叠的 条评论
为什么被折叠?



