hibernate.cfg.xml

2019-03-14  本文已影响0人  42个艾尔
<?xml version='1.0' encoding='utf-8'?>
<!--
  ~ Hibernate, Relational Persistence for Idiomatic Java
  ~
  ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
  ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
  -->
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
 
<hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
        <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
        <property name="hibernate.connection.username">hr</property>
        <property name="hibernate.connection.password">123</property>
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
        <property name="hibernate.hbm2ddl.auto">update</property>
        <property name="current_session_context_class" >thread</property>
        <property name="show_sql" >true</property>
        
        <!-- <property name="hibernate.connection.pool_size">5</property>
        <property name="hibernate.c3p0.min_size">50</property>
        <property name="hibernate.c3p0.max_size">800</property>
        <property name="hibernate.c3p0.max_statements">50</property>
        <property name="hibernate.jdbc.batch_size">10</property>
        <property name="hibernate.c3p0.timeout">300</property>
        <property name="hibernate.c3p0.idle_test_period">3000</property>
        <property name="hibernate.c3p0.testConnectionOnCheckout">true</property> -->
        
        <!-- <property name="hibernate.connection.pool_size">5</property>
        <property name="hibernate.jdbc.batch_size">10</property>
        <property name="hibernate.connection.provider_class">proxool</property>
        <property name="hibernate.proxool.properties">pool-one.properties</property>
        <property name="hibernate.proxool.pool_alias">pool-one</property> -->
        
        <!-- <property name="hibernate.cache.region_prefix">hibernate.test</property>
        <property name="cache.use_query_cache">true</property>
        <property name="cache.use_second_level_cache">true</property>
        <property name="cache.use_structured_entries">true</property>
        <property name="cache.region.factory_class">org.hibernate.cache.EhCacheRegionFactory</property>
        <property name="net.sf.ehcache.configurationResourceName">file:///[PATH]/unmanaged-jpa/src/main/resources/ehcache.xml</property> -->
    
        <!-- <property name="hibernate.cache.region_prefix">hibernate.test</property>
        <property name="cache.use_query_cache">true</property>
        <property name="cache.use_second_level_cache">true</property>
        <property name="cache.use_structured_entries">true</property>
        <property name="cache.region.factory_class">org.hibernate.cache.infinispan.InfinispanRegionFactory</property> -->
        
        <!--<mapping class="org.hibernate.osgitest.entity.DataPoint"/>-->


       <mapping resource="Mappings.hbm.xml"></mapping>


    </session-factory>
 
</hibernate-configuration>
上一篇 下一篇

猜你喜欢

热点阅读