在创建Configuration对象之后:Configuration cfg = new Configuration().configure();
  要通过Configuration创建SessionFactory对象:

  1. SessionFactory sf = cfg.buildSessionFactory();  // 是Hibernate3.X时的写法

  2. ServiceRegistry sr = new ServiceRegistryBuilder().applySettings(cfg.getProperties()).buildServiceRegistry();是Hibernate4.3 ~ Hibernate4.0时的

  3. ServiceRegistry sr = new StandardServiceRegistryBuilder().applySettings(cfg.getProperties()).build();

   SessionFactory sf = cfg.buildSessionFactory(sr);  // Hibernate4.3时的

The method buildSessionFactory() from the type Configuration is deprecated.SessionFactory的变化的更多相关文章

  1. The method newInstance() from the type Class is deprecated since version 9

    newInstance()在 java9中已被弃用 JAVA9之前用法 Class.forName("类的全限定名").newInstance(); JAVA9之后用法 Class ...

  2. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,reflectorFactory?,plugins?,environments?,databaseIdProv

    在mybatis配置文件config.xml中报错: The content of element type "configuration" must match "(p ...

  3. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC & ...

  4. The method onClick(View) of type new View.OnClickListener(){} must override a superclass

    最近在做一个jWebSocket Android客户端的Demo时遇到如下错误: ok —————— 最近在做一个jWebSocket Android客户端的Demo时遇到如下错误: ".. ...

  5. 【转】The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    [转]The content of element type "configuration" must match "(properties?,settings?,typ ...

  6. eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass method

    在做arcgis android开发的时候,突然遇到这种错误,The method onClick(View) of type new View.OnClickListener(){} must ov ...

  7. Bean property ‘mapperHelper’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

    spring boot 报错: Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property ...

  8. JAVA克隆对象报错:The method clone() from the type Object is not visible

    将一个对象复制一份,称为对象的克隆技术.在Object类汇总存在一个clone()方法:protected Onject clone() throws CloneNotSupportedExcepti ...

  9. eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass method 在做arcgis android开发的时候,突然遇到这种错误,The method onClick(View) of type new View.OnClickListener(){} mus

    eclise -The method onClick(View) of type new View.OnClickListener(){} must override a superclass met ...

随机推荐

  1. easyUI datagrid 前端真分页

    前文再续,书接上一回.easyUI datagrid 前端假分页 http://blog.csdn.net/leftfist/article/details/43164977 真分页是easyUI d ...

  2. build.gradle解析

    1 providedCompile.testImplementation.implementation.api.runtime.testCompile.classpath.natives 这些都是和p ...

  3. JMeter快捷键图标制作 去掉cmd命令窗口

    使用jmeter时: 如果使用默认的jmeter.bat启动的话,会出现一个CMD命令窗口之后再会启动jmeter工作界面 直接启用ApacheJMeter.jar文件即可跳过CMD命令窗口启动jme ...

  4. 4.2 Context-Free Grammars

    4.2 Context-Free Grammars Grammars were introduced in Section 2.2 to systematically describe the syn ...

  5. 从csv文件读取数据到二维vector

    void ReadDataFromCsv(std::string &filename, std::vector<std::vector<std::string> > & ...

  6. 栗染-Not enough physical memory is available to power on this virtual machine with its configured settings.

    这是在打开虚拟机的时候报的错 解决办法:打开虚拟机的时候选择以管理员身份运行()目测可以 原文参考来自:http://blog.csdn.net/qq_35757415/article/details ...

  7. bzoj 1690: [Usaco2007 Dec]奶牛的旅行【01分数规划+spfa】

    把add传参里的double写成int我也是石乐志-- 首先这个东西长得就很01分数规划 然后我不会证为什么没有8字环,我们假装他没有 那么设len为环长 \[ ans \leq \frac{\sum ...

  8. [App Store Connect帮助]六、测试 Beta 版本(4.4) 管理 Beta 版构建版本:停止测试构建版本

    在首页上,点按“我的 App”,选择您的 App,然后在工具栏中点按“TestFlight”. 在左列中的“构建版本”下,点按您 App 的平台(iOS 或 Apple TVOS). 在右表中,点按该 ...

  9. Authorization 头信息为空的解决方案

    在 Apache配置添加SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=此次问题完美解决.

  10. vue开发环境和生产环境里面解决跨域的几种方法

    什么是跨域   跨域指浏览器不允许当前页面的所在的源去请求另一个源的数据.源指协议,端口,域名.只要这个3个中有一个不同就是跨域. 这里列举一个经典的列子: #协议跨域 http://a.baidu. ...