ServiceRegistry sr=new ServiceRegistryBuild().applySettings(conf.getProperties()).builderRegistry; SessionFactory sf = conf.buildSessionFactory(); 查看完整描述