在Hibernate 4中我發現(新的)我可能使用XSD模式而不是DTD。Hibernate 4中新的XSD模式
<hibernate-mapping xmlns="http://www.hibernate.org/xsd/hibernate-mapping"
xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-mapping hibernate-mapping-4.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
但架構位置無效,在初始化期間我有錯誤。
有沒有人知道Hibernate 4中的XSD有什麼問題?
如果需要,以下是Hibernate配置文件的XML Schema Definition文件的工作位置(現在):** http://hibernate.org/xsd/hibernate-configuration/hibernate-configuration-4.0 .xsd **您可以在'xsi:schemaLocation'屬性中使用它。以下頁面提供了可用於Hibernate的XSD文件的鏈接(目前只有_one_ XSD):http://hibernate.org/xsd/hibernate-configuration/。 – informatik01 2016-11-13 21:27:12