hibernate下载包中配置文件路径
路径: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下载包中配置文件路径的更多相关文章
- java项目部署之后,Jar包中配置文件修改
Java项目发布时,配置文件不像.net项目一样与工程路径保持一致,而是直接包含在了jar包中,此时要修改就没那么方便了,我们可以将配置文件从jar包抽离出来,修改完之后再写入Jar包即可, 也没那么 ...
- struts2,hibernate等模板配置文件在jar包中的路径,以及所需要的包
一.struts2 1.struts的配置模板文件struts-default.xml的位置: struts-2.3.16.1 --> src --core --> src --> ...
- 如何正确读取war包中配置文件的路径
转自:http://free-chenwei.iteye.com/blog/1507480 下面展示一段代码String path = getClass().getResource("/&q ...
- 关于spring中配置文件路径的那些事儿
在项目中我们经常会需要读一些配置文件来获取配置信息,然而对于这些配置文件在项目中存放的位置以及获取这些配置文件的存放路径却经常搞不清楚,自己研究了一下,记录下来以备后用. 测试代码如下 package ...
- java war包 路径--解决war包中文件路径问题
https://blog.csdn.net/u013409283/article/details/51480948 转自:http://free-chenwei.iteye.com/blog/1507 ...
- vue2.0中配置文件路径
在build/webpack.base.conf.js中添加一些代码即可 module.exports = { resolve: { extensions: ['.js', '.vue', '.jso ...
- springboot jar启动 读取jar包中相对路径文件报错
jar包启动后读取相对路径文件报异常: Caused by: java.io.FileNotFoundException: class path resource [***.***] cannot b ...
- maven摘除jar包中配置文件
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-p ...
- Spring boot + mybatis 只读取到一个jar包中的mapper配置文件
采用spring boot 开发了一个多模块项目,有多个模块中都有mapper配置文件. 采用如下的方式配置,制度去到了一个模块jar包中配置文件: @Bean(name = "sqlSe ...
随机推荐
- 对bootstrap modal的简单扩展封装
对bootstrap modal的简单扩展封装 参考自:http://www.muzilei.com/archives/677 注:原文不支持bootstrap新版本,并且居中等存在问题 此段时间 ...
- 作业七:团队项目——Alpha版本冲刺阶段-06
昨天进展:代码编写. 今天安排:代码编写.
- jenkins2 pipeline入门
本文通过简单的pipeline的实例和详细的讲解,能够学习基本pipeline的groovy用法,然后开始实现自己的pipeline job. 翻译和修改自:https://github.com/je ...
- 自己动手写js分享插件(QQ空间,微信,新浪微博。。。)
参考博客:http://blog.csdn.net/libin_1/article/details/52424340 下载链接:http://download.csdn.net/detail/come ...
- django with mysql (part-2)
step01: write a ( views.py ) file vim views.py Insert the below code : step02: configure your ( urls ...
- paip.java 多线程参数以及返回值Future FutureTask 的使用.
paip.java 多线程参数以及返回值Future FutureTask 的使用. 在并发编程时,一般使用runnable,然后扔给线程池完事,这种情况下不需要线程的结果. 所以run的返回值是vo ...
- SpringCloud+Consul 服务注册与服务发现
SpringCloud+Consul 服务注册与服务发现 1. 服务注册: 在Spring.factories有一段: # Discovery Client Configuration org.spr ...
- javaweb回顾第四篇Servlet异常处理
前言:很多网站为了给用户很好的用户体验性,都会提供比较友好的异常界面,现在我们在来回顾一下Servlet中如何进行异常处理的. 1:声明式异常处理 什么是声明式:就是在web.xml中声明对各种异常的 ...
- adb devices指令实例讲解
在讲这个指令之前,我首先启动了一个名称为“Galaxy_Nexus_4.4.2”的手机模拟器(有时我们也管其叫安卓虚拟设备),并且通过USB数据线将我的手机设备和PC进行了连接,而后我应用“Andro ...
- 曲率已驱动了头发——深度分析谷歌AlphaGo击败职业棋手
这篇是我们自开设星际随笔以来写得最长的一篇.我们也花了不少力气.包括把那5盘棋各打了两遍的谱,包括从Nature官网上把那篇谷歌的报告花了200元下载下来研究它的算法(后来发现谷 歌网站上可以免费下载 ...