package com.test.Util;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration; public class HibernateUtil {
private static final SessionFactory sessionFactory; static {
try {
sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
} catch (Throwable ex) {
System.err.println("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
}
} public static SessionFactory getSessionFactory() {
return sessionFactory;
} }

最新文章

  1. eclipse绘制activiti无法生成图形
  2. [MySQL] 高可用架构MMM简单介绍
  3. 【BZOJ-4690】Never Wait For Weights 带权并查集
  4. JavaWeb---总结(十六)JSP指令
  5. (翻译)如何对python dict 类型按键(keys)或值(values)排序
  6. js021-Ajax与Comet
  7. ural 2068. Game of Nuts
  8. (原)python中import caffe提示no module named google.protobuf.internal
  9. TCP和HTTP
  10. linux终端下文件不同颜色的含义
  11. java实现对服务器的自动巡检邮件通知
  12. 统计学习方法 三 kNN
  13. 【H5】-- FormData用法介绍以及实现图片/文件上传--【XUEBIG】
  14. ES5和ES6那些你必须知道的事儿(二)
  15. C# to IL 7 Pointers(指针)
  16. Simple Path Data Resources that I Add to Every WPF and Silverlight Project
  17. PHP behavior 机制简单实现
  18. 多网卡的7种bond模式原理 For Linux
  19. python assert 断言详细用法格式
  20. [原][译][osgearth]Model Source Drivers模型驱动源(OE官方文档翻译)

热门文章

  1. 34.UCASE() LCASE() 函数
  2. .net中对HTTP请求的两种请求:Get和Post的操作
  3. React项目中的registerServiceWorker的作用
  4. 使用Recyclerview实现图片水平自动循环滚动
  5. 备忘录(Memento)模式
  6. 新编html网页设计从入门到精通 (龙马工作室) pdf扫描版​
  7. IOException while loading persisted sessions: java.io.EOFException
  8. 【转】Android自定义控件(三)——有弹性的ListView
  9. Redhat7无法启动mysql
  10. 洛谷P4016 负载平衡问题(费用流)