标签:
<?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">
<hibernate-configuration>
<session-factory>
<!-- 数据库连接信息 -->
<property name="connection.url">
jdbc:oracle:thin:@localhost:1521:xe
</property>
<property name="connection.username">lhh</property>
<property name="connection.password">123456</property>
<property name="connection.driver_class">
oracle.jdbc.OracleDriver
</property>
<!-- Hibernate配置信息 -->
<!-- dialect方言,用于配置生成针对哪个数据库的SQL语句 -->
<property name="dialect">
<!--方言类,Hibernate提供的,用于封装某种特定数据库的方言 -->
org.hibernate.dialect.OracleDialect
</property>
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<!-- 在配置文件中关联映射文件 -->
<mapping resource="com/tarena/pojo/Person.hbm.xml" />
</session-factory>
</hibernate-configuration>
标签:
原文地址:http://www.cnblogs.com/Crow00/p/4489021.html