二、在Eclipse中生成POLO和映射文件
1) 在Eclipse中配置环境,包括数据库驱动程序(此处略)
2) 生成POLO类和映射文件
此处以Houses为例,生成的原代码和映射文件如下:
a) hibernate.cfg.xml
?xml version=´1.0´ encoding=´UTF-8´?
!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"
!-- DO NOT EDIT: This is a generated file that is synchronized --
!-- by MyEclipse Hibernate tool integration. --
hibernate-...[ 查看全文 ]