Maven 多模块开发(6)-hibernate.cfg.xml
Maven 多模块开发(六)-hibernate.cfg.xml
- <?xml version='1.0' encoding='UTF-8'?>
- <!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
- <hibernate-configuration>
- <session-factory>
- <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
- <property name="jdbc.batch_size">20</property>
- <property name="connection.autocommit">true</property>
- <!-- 显示sql语句 -->
- <property name="show_sql">true</property>
- <property name="connection.useUnicode">true</property>
- <property name="connection.characterEncoding">UTF-8</property>
- <!-- 缓存设置 ehcache.xml (可以到下载的hibernate文件目录(hibernate-release-4.3.4.Final\hibernate-release-4.3.4.Final\project\etc)下找-->
- <property name="cache.provider_configuration_file_resource_path">/ehcache.xml</property>
- <property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property>
- <property name="cache.use_query_cache">true</property>
- </session-factory>
- </hibernate-configuration>