是因为事务没有提交

在hibernate.cfg.xml文件中加入

<propertyname="connection.autocommit">true</property>

搞定了...(或者自己写dao)