0
我是hibernate的新手,我在使用getCurrentSession()和openSession()检索会话时有点困惑,许多文章都提到getCurrentSession会创建一个全新的会话,尚未存在,并且如果会话已经可用,则不会创建新会话,另一方面,openSession会创建一个全新的会话。在休眠中使用getCurrentSession()和openSession()检索会话
- 在这里,我有一个混淆确实openSession()总是创建一个全新的会话?
- 休眠池会话是否在getCurrentSession()中使用相同的会话?
能否请你帮我澄清这一点,并表示歉意我没有犯错
非常感谢