名称:Example.hbm.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class name="com.troyforever.example.data.bean.Test" table="test" schema="example">
<id name="id" type="java.lang.Integer" column="id">
<generator class="identity">
</generator>
</id>
<property name="age" type="java.lang.Integer">
<column name="age" not-null="true" />
</property>
<property name="content" type="java.lang.String">
<column name="content" length="2000" not-null="true" />
</property>
<property name="addtime" type="java.util.Date">
<column name="addtime" />
</property>
</class>
</hibernate-mapping>