详解Hibernate的API: (1)Configuration接口: org.hibernate.cfg.Configuration接口的作用是加载主配置文件及映射文件,以实现对Hibernate的启动.Configuration实例调用buildSessionFactory方法便可创建一个Session工厂SessionFactory对象. Configuration cfg = new Configuration().configure(); new Configuration()会加载…
For Hibernate configuration, We can use hibernate.cfg.xml file to configure: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.o…