这是因为您已hibernate。
current_session_context_class启用属性
当将Hibernate与Spring结合使用会破坏适当的会话和事务管理时,切勿使用该属性。唯一要设置此属性的时间是,如果您在JTA环境中使用Spring和Hibernate,则不要使用它。

这是因为您已hibernate。
current_session_context_class启用属性
当将Hibernate与Spring结合使用会破坏适当的会话和事务管理时,切勿使用该属性。唯一要设置此属性的时间是,如果您在JTA环境中使用Spring和Hibernate,则不要使用它。