<?xml version="1.0"?>
<!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.bjsxt.hibernate.User" >
<id name="id">
<generator class="uuid"></generator>
</id>
<property name="id"/>
<property name="name"/>
<property name="password"/>
<property name="createTime"/>
<property name="expireTime"/>
</class>
</hibernate-mapping>
提示错误 id (should be mapped with insert="false" update="false")
是由于重复定义引起 去掉一个Id 的定义即可