hibernate多表问题。在线等
发布网友
发布时间:2022-04-08 19:13
我来回答
共1个回答
热心网友
时间:2022-04-08 20:42
private static Configuration conf;
private static SessionFactory factory;
static{
try {
conf=new Configuration();
factory=conf.configure().buildSessionFactory();
Session session=factory.openSession()
} catch (HibernateException e) {
throw new HibernateException(e);
} catch(Exception e){
e.printStackTrace();
}
}