
注释
@Transientprivate MultipartFile file;
更新
从您的堆栈跟踪:
Caused by: org.hibernate.MappingException: Could not determine type for: org.springframework.web.multipart.MultipartFile, at table: documents, for columns: [org.hibernate.mapping.Column(file)]
错误是明确的,JPA不知道如何将其映射
MultipartFile为列。
使用
@Transient我们是说根本不映射。
因此请 删除您的数据库并重新创建它,清理并重新编译您的代码 ,因为此错误表明您的代码尚未使用进行编译
@Transient。
并确保
@Transient是
@javax.persistence.Transient
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)