No CurrentSessionContext configured! 异常解决

错误提示
在这里插入图片描述
解决办法
核心配置文件xml中要配置方言

  <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

之后添加

<property name="current_session_context_class">thread</property>

ok

发布了60 篇原创文章 · 获赞 16 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_44142032/article/details/90245548
今日推荐