[英]How to use properties notation in a Hibernate XML configuration file
[英]Hibernate Properties or configuration file to use
对于休眠项目,建议使用hibernate.properties
文件或hibernate.cfg.xml
文件。 使用什么?
并且请您也可以指定为什么使用属性代替配置,反之亦然
最好使用哪个hibernate.properties文件或hibernate.cfg.xml文件
hibernate.properties是表示连接信息的旧方法,对于最新版本(2.0+),它已被基于XML的配置文件取代,因为它更灵活并且具有更多功能。
但是,有一个线程解释如何将它们结合在一起,您应该看一下该线程: 如何使用hibernate.properties文件而不是hibernate.cfg.xml 。
您还应该查看Hibernate文档http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html 3.7章。 XML配置文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.