openSession与getCurrentSession 的区别 getCurrentSession在事务提交或者回滚之后会自动关闭,而openSession 需要你手动关闭。如果使用openSession而没有手动关闭,多次之后会导致连接池溢出。openSession 每次创建新的session对象,getCurrentSession使用现有的session对象