<hibernate-configuration>
<session-factory>
<!-- 配置 hibernate 的基本属性 --><!-- 方言 -->
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<!-- 是否显示及格式化 SQL -->
<property name="hibernate.show_sql">true</property> <property name="hibernate.format_sql">true</property>
<!-- 生成数据表的策略 -->
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- 二级缓存相关 -->
</session-factory>
</hibernate-configuration>