数据被缓存了未flush。
save方法后添加getHibernateTemplate().flush();
在hibernate.cfg.xml里面加入
<property name="connection.autocommit">true </property>
如果用spring管理Hibernate,则applicationContext.xml中
<property name="hibernateProperties">
<props>
<prop key="connection.autocommit">true</prop> <!-- 添加这个 -->
<props>
</property>