问题1:Could not bind factory to JNDI
hibernate.cfg.xml中<sessionFactory> 标签中的name="foo" 去掉
问题2:如何获得sessionFactory
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
hibernate.cfg.xml存放位置src/main/resources
问题1:Could not bind factory to JNDI
hibernate.cfg.xml中<sessionFactory> 标签中的name="foo" 去掉
问题2:如何获得sessionFactory
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
hibernate.cfg.xml存放位置src/main/resources