首页 > 移动平台 > 详细

hibernate 出现 org.hibernate.MappingException: entity class not found 的解决办法

时间:2016-12-22 00:42:45      阅读:306      评论:0      收藏:0      [点我收藏+]

在Hibernate 5.0版本以上时,出现异常

org.hibernate.MappingException: entity class not found:

如果确认配置和代码都无误的情况下,可尝试增加一行代码解决:


Configuration configuration = new Configuration().configure();

//增加下行代码

configuration.addClass(News.class);




本文出自 “程序员瑞欣” 博客,请务必保留此出处http://rayshine.blog.51cto.com/6941801/1884821

hibernate 出现 org.hibernate.MappingException: entity class not found 的解决办法

原文:http://rayshine.blog.51cto.com/6941801/1884821

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!