异常信息:
No CurrentSessionContext configured!
解决方法:
在hibernate.cfg.xml文件中的sessionFactory的配置节点中配置如下一段
<property name="current_session_context_class">thread</property>