1. 要使用 getCurrentSession() 方法,需要添加对应的配置
<property name="hibernate.current_session_context_class">thread</property>
2. 注意: