Hibernate.cfg.xml

来源:互联网 发布:拼音生字软件 编辑:程序博客网 时间:2024/06/05 01:58
<?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>
        <!-- The database dialect -->
        <property name="hibernate.dialect">
            org.hibernate.dialect.MySQLDialect
        </property>
        <!-- The database connection URL -->
        <property name="hibernate.connection.url">
            jdbc:mysql://localhost:3306/db_hr
        </property>
        <!-- The database username -->
        <property name="hibernate.connection.username">root</property>
        <!-- THe database password -->
        <property name="hibernate.connection.password">123456</property>
        <!-- The database driver class -->
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        <!--Output all SQL statements to the console (输出SQL语句到控制台) -->
        <property name="show_sql">true</property>
        <!-- In the log and the console print out more beautiful SQL (格式化打印SQL语句) -->
        <property name="format_sql">true</property>
        <!-- -->
        <mapping resource="com/hst/po/Employee.hbm.xml" />
    </session-factory>
</hibernate-configuration>
0 0