0
点赞
收藏
分享

微信扫一扫

2022年8月16日——hibernate的文档使用(1)

描述:

hibernate的API文档使用(1),导入外部的包的使用,通过关键字,package,resource等。

效果展示:

2022年8月16日——hibernate的文档使用(1)_.net

代码:

<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<mapping package="test.animals"/>
<mapping class="test.Flight"/>
<mapping class="test.Sky"/>
<mapping class="test.Person"/>
<mapping class="test.animals.Dog"/>
<mapping resource="test/animals/orm.xml"/>
</session-factory>
</hibernate-configuration>

注意:其中的层级关系。还有就是包含关系。使用的关键字,与数据是否对应等。

package对应包的路径,其中是以点进行分隔。

class对应单个类的全路径,其中是以点进行分隔。

resource对应xml文件的路径。其中是以斜杆分隔。

头部数据:

<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

根标签:

<hibernate-configuration>

</hibernate-configuration>

举报

相关推荐

0 条评论