为什么getCurrentSession()是在同一个session里面??
需要去 hibernate.cfg.xml中配置成同一个线程
<!-- 配置事务(session与当前线程绑定) -->
<property name="hibernate.current_session_context_class">thread</property>
为什么getCurrentSession()是在同一个session里面??
需要去 hibernate.cfg.xml中配置成同一个线程
<!-- 配置事务(session与当前线程绑定) -->
<property name="hibernate.current_session_context_class">thread</property>