zoukankan      html  css  js  c++  java
  • hibernate下载包中配置文件路径

    路径:hibernate-release-5.0.2.Finalprojecthibernate-ehcachesrc est esourceshibernate-config

    文件:hibernate.cfg.xml

    <?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 3.0//EN"
            "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
    
    <hibernate-configuration>
    
        <session-factory>
    
            <!-- Database connection settings -->
            <!-- <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
                        <property name="connection.url">jdbc:hsqldb:hsql://localhost/TestDB</property> -->
    
            <property name="connection.driver_class">org.h2.Driver</property>
            <property name="connection.url">jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE</property>
            <property name="connection.username">sa</property>
            <property name="connection.password"></property>
    
            <!-- JDBC connection pool (use the built-in) -->
            <property name="connection.pool_size">1</property>
    
            <!-- SQL dialect -->
            <property name="dialect">
                org.hibernate.dialect.H2Dialect
            </property>
    
            <!-- Enable Hibernate's automatic session context management -->
            <property name="current_session_context_class">thread</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">/hibernate-config/ehcache.xml</property>
            <!-- Echo all executed SQL to stdout -->
            <property name="show_sql">true</property>
    
            <mapping resource="hibernate-config/domain/Event.hbm.xml"/>
            <mapping resource="hibernate-config/domain/Person.hbm.xml"/>
            <mapping resource="hibernate-config/domain/PhoneNumber.hbm.xml"/>
            <mapping resource="hibernate-config/domain/Account.hbm.xml"/>
            <mapping resource="hibernate-config/domain/HolidayCalendar.hbm.xml"/>
    
            <mapping resource="hibernate-config/domain/Item.hbm.xml"/>
    
        </session-factory>
    
    </hibernate-configuration>
  • 相关阅读:
    Web移动端项目适配(适用于原生JavaScript,Vue,React等项目中)
    Vue——实现一键复制
    解决报错Uncaught (in promise) NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"}
    解决h5嵌入app后video标签poster不能显示视频第一帧(表现为空白)
    Vue——长按元素实现某种操作
    小程序生命周期
    解决 mpvue 项目使用 vant-weapp 组件库 Uploader 时其中的 after-read 方法回调函数调用不成功
    我的考场vimrc的配置
    ubuntu vim solarized vimrc配置
    HNOI 2015 亚瑟王 概率期望DP
  • 原文地址:https://www.cnblogs.com/wangpei/p/5224212.html
Copyright © 2011-2022 走看看