路径: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. node-webkit教程(15)当图片加载失败的时候

    在node-webkit教程(14)禁用缓存中,简单讲了当前禁用缓存的几种方法. 在实际开发过程中,我遇到了一个因为缓存引起的诡异的问题.应用场景如下: 在一个编辑器里,不停的向画布上添加svg或者其 ...

  2. [C++] socket -9[匿名管道]

    ::怎么弄都不能读取信息....先把代码放着.... #include<windows.h> #include<stdio.h> int main() { HANDLE rea ...

  3. LInux iptables学习

    作者原文 : http://blog.chinaunix.net/uid-9950859-id-98277.html       要在网上传输的数据会被分成许多小的数据包,我们一旦接通了网络,会有很多 ...

  4. mysql导入sql文件

    从命令提示符下到MYSQL文件目录中的Bin文件夹下,执行命令 mysql -u root -p databasename < db.sql 其中root是你MYSQL的用户名,database ...

  5. Ubuntu下postgresql安装

    第一步:在Ubuntu下安装Postgresql         1.使用 apt-get install 安装          zhang@ubuntu:~/protgresql#sudo apt ...

  6. mac下缺乏make wget怎么办?

    1.下载command Line tools for Xcode http://www.mkyong.com/mac/how-to-install-gcc-compiler-on-mac-os-x/ ...

  7. .net中对象序列化技术浅谈

    .net中对象序列化技术浅谈 2009-03-11 阅读2756评论2 序列化是将对象状态转换为可保持或传输的格式的过程.与序列化相对的是反序列化,它将流转换为对象.这两个过程结合起来,可以轻松地存储 ...

  8. atitit. orm mapping cfg 映射配置(3)-------hbnt one2maney cfg

    atitit. orm mapping cfg  映射配置(3)-------hbnt one2maney  cfg 1. 建立list 1 2. 配置xml 1 3. Hibernate中Set和L ...

  9. js程序设计02——变量、作用域问题

    首先,ECMAScript中的数据类型分为基本类型.引用类型,基本类型的访问操作是按值的.引用类型的值是保存在内存中的对象,操作对象时,实际上操作的是对象的引用,而非对象自身.“javascript高 ...

  10. Python面试题(二)

    打印九九乘法表 思路:利用字符串的连接,梯形输出结果 >>> def st(num): ... l = [] ... for x in xrange(1, num + 1): ... ...