路径:hibernate-release-5.0.2.Final\project\hibernate-ehcache\src\test\resources\hibernate-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>

hibernate下载包中配置文件路径的更多相关文章

  1. java项目部署之后,Jar包中配置文件修改

    Java项目发布时,配置文件不像.net项目一样与工程路径保持一致,而是直接包含在了jar包中,此时要修改就没那么方便了,我们可以将配置文件从jar包抽离出来,修改完之后再写入Jar包即可, 也没那么 ...

  2. struts2,hibernate等模板配置文件在jar包中的路径,以及所需要的包

    一.struts2 1.struts的配置模板文件struts-default.xml的位置: struts-2.3.16.1 --> src --core --> src --> ...

  3. 如何正确读取war包中配置文件的路径

    转自:http://free-chenwei.iteye.com/blog/1507480 下面展示一段代码String path = getClass().getResource("/&q ...

  4. 关于spring中配置文件路径的那些事儿

    在项目中我们经常会需要读一些配置文件来获取配置信息,然而对于这些配置文件在项目中存放的位置以及获取这些配置文件的存放路径却经常搞不清楚,自己研究了一下,记录下来以备后用. 测试代码如下 package ...

  5. java war包 路径--解决war包中文件路径问题

    https://blog.csdn.net/u013409283/article/details/51480948 转自:http://free-chenwei.iteye.com/blog/1507 ...

  6. vue2.0中配置文件路径

    在build/webpack.base.conf.js中添加一些代码即可 module.exports = { resolve: { extensions: ['.js', '.vue', '.jso ...

  7. springboot jar启动 读取jar包中相对路径文件报错

    jar包启动后读取相对路径文件报异常: Caused by: java.io.FileNotFoundException: class path resource [***.***] cannot b ...

  8. maven摘除jar包中配置文件

    <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-p ...

  9. Spring boot + mybatis 只读取到一个jar包中的mapper配置文件

    采用spring boot  开发了一个多模块项目,有多个模块中都有mapper配置文件. 采用如下的方式配置,制度去到了一个模块jar包中配置文件: @Bean(name = "sqlSe ...

随机推荐

  1. LoadRunner测试50人同时登陆下单

    LoadRunner测试50人同时登陆下单 一.LoadRunner简介 LoadRunner,是一种预测系统行为和性能的负载测试工具.通过以模拟上千万用户实施并发负载及实时性能监测的方式来确认和查找 ...

  2. 【Leetcode】【Hard】Merge k Sorted Lists

    Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 解 ...

  3. 大熊君说说JS与设计模式之------中介者模式Mediator

    一,总体概要 1,笔者浅谈 我们从日常的生活中打个简单的比方,我们去房屋中介租房,房屋中介人在租房者和房东出租者之间形成一条中介.租房者并不关心他租谁的房.房东出租者也不关心他租给谁.因为有中介的存在 ...

  4. 轻松实现ajax登录时让浏览器保存密码

    将登录页面由form提交改为ajax提交,发现一个副作用——登录时浏览器不会提示是否保存密码,这样每次登录都要输入用户名/密码. html代码如下: <script> $(function ...

  5. 【Android】EventBus 源码解析

    EventBus 源码解析 本文为 Android 开源项目实现原理解析 中 EventBus 部分项目地址:EventBus,分析的版本:ccc2771,Demo 地址:EventBus Demo分 ...

  6. python __str__ & __repr__ & __cmp__

    For ( __str__ ),we going to see a example ... and find who is working for ... #!/usr/bin/python clas ...

  7. ASP.NET MVC4+EasyUI+EntityFrameWork5权限管理系统——菜单模块的实现(二)

    ASP.NET MVC4+EasyUI+EntityFrameWork5权限管理系统——数据库的设计(一) 菜单和模块是在同一个表中,采用的是树形结构,模块菜单表结构如下代码: USE [Permis ...

  8. shell命令从目录中循环匹配关键词

    #!/bin/bash while read line do for file in /home/local/test/* do if test -f $file then sed -n " ...

  9. Libjingle库简介

    原文链接 国内现在很多语音聊天工具都是基于TURN方式实现的,包括YY.AK等等,这种方式对于服务器的性能要求很高,而且在用户量增大的时候,服务器压力也会越来越大,用户的语音质量也会受到很大影响.而基 ...

  10. nginx 配置其他路径

    gedit /etc/nginx/sites-enabled/default location /hlstest { types { application/vnd.apple.mpegurl m3u ...