package com.zuidaima.util; import org.hibernate.SessionFactory; import org.hibernate.cfg.AnnotationConfiguration; public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static SessionFactory buildSessionFactory() { try { return new AnnotationConfiguration().configure().buildSessionFactory(); } catch (Throwable ex) { throw new ExceptionInInitializerError(ex); } } public static SessionFactory getSessionFactory() { return sessionFactory; } public static void shutdown() { getSessionFactory().close(); } }

wang9577 LV1
2021年9月9日
jackie5212 LV2
2021年3月2日
普通滴程序猿 LV1
2019年8月20日
laozhengyu LV1
2018年9月4日
mzhh159 LV1
2018年4月18日
全球先生 LV6
2018年4月14日
xiaopixiong LV4
2018年3月1日
xiayulin1983 LV2
2017年11月11日
SUPERABLKS LV3
2017年11月2日
24621016193 LV2
2017年4月19日