[SSH] Hibernate配置的最后三个调试问题

一 java.lang.NoClassDefFoundError: org/hibernate/engine/SessionFactoryImplementor

解决方法:

<!-- 添加这一行 --!>


添加dateSource,并把hibernate4换成hibernate5


HTTP Status 500 - attempt to create saveOrUpdate event with null entity

模型驱动:
getModel()应该返回实体,而我仍然是返回null。

解决方法:
getModel()返回实体。(return product)


org.springframework.orm.hibernate5.HibernateSystemException: Unknown integral data type for ids : java.lang.String; nested exception is org.hibernate.id.IdentifierGenerationException: Unknown integral data type for ids : java.lang.String

把主键的类型由int改为string。

猜你喜欢

转载自blog.csdn.net/wjl960827/article/details/82940343
今日推荐