hibernate 中每个实体类必须提供一个无参构造函数,因为 hibernate 框架要使用 reflection api,通过调用 ClassnewInstance() 来创建实体类的实例,如果没有无参的构造函数就会抛出异常。 Was this helpful? YesNo 0 / 0 上一篇: MyBatis 中 #{}和 ${}的区别是什么? 下一篇: 在 hibernate 中 getCurrentSession 和 openSession 的区别是什么? 发表回复 取消回复0 Your email address will not be published. 在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。