【问题标题】:hibernate.properties vs hibernate.cfg.xmlhibernate.properties 与 hibernate.cfg.xml
【发布时间】:2011-09-22 23:49:18
【问题描述】:

hibernate.properties 和 hibernate.cfg.xml 的优先顺序是什么?

据我所知,hibernate.cfg.xml(如果存在于应用程序的类路径中)会覆盖 hibernate.properties。我的假设正确吗?

谢谢

【问题讨论】:

    标签: hibernate configuration


    【解决方案1】:

    来自documentation

    另一种配置方法是在名为 hibernate.cfg.xml 的文件中指定完整配置。此文件可用作 hibernate.properties 文件的替代品,或者,如果两者都存在,则可以覆盖属性。

    【讨论】:

    • 文档链接将不胜感激。
    猜你喜欢
    • 1970-01-01
    • 2014-07-17
    • 1970-01-01
    • 2016-06-29
    • 2018-11-22
    • 2013-07-11
    • 2013-07-02
    • 2011-06-12
    • 1970-01-01
    相关资源
    最近更新 更多