0

In Eclipse I produce the hbm.xml file automatically using db browser. When I deploy my project there is the following exception printed on the console:</p>

Could not parse mapping document from resource. hbm.xml.

When I modified the hibernate-configuration PUBLIC in hbm.xml to be hibernate-mapping PUBLIC there is no exception. Why? What's the difference between the two?

4

1 回答 1

0
hibernate-mapping PUBLIC( For domain object mapping files only)

映射文档是一个 XML 文档,根元素包含所有元素,即为您的域对象创建表的元素

hibernate-configuration PUBLIC(for configuration file only )

用于提供建立数据库连接所必需的信息。将域对象映射到数据库表的映射细节也是 Hibernateconfiguration文件的一部分。

于 2013-04-06T06:50:34.060 回答