1.configuration.config() 读取hibernate.cfg.xml文件
2.由hibernate.cfg.xml读取文件中的<mapping resource="com/xx/User.hbm.xml">
3.通过config.buildSessionFactory();//创建SessionFactory
4.通过SessionFactory.openSession();//打开session
5.session.beginTransaction();//创建事务 Transation
6.persistent operate 持久化操作
7.session.getTransaction();
8.关闭session
9.关闭sessionFactory