<?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" >
<session-factory>
<!--database connection information--
<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 configuration information-
<!--dialect dialect, which configures the SQL statement for which database is generated--
<property name= "dialect" >
<!--dialect, Hibernate provides a dialect to encapsulate a particular database---
Org.hibernate.dialect.OracleDialect
</property>
<property name= "Show_sql" >true</property>
<property name= "Format_sql" >true</property>
<!--associating a mapping file in a configuration file--
<mapping resource= "Com/tarena/pojo/person.hbm.xml"/>
</session-factory>
Hibernate.cfg.xml Basic Configuration