首先创建一个BaseModel,自动生成创建时间和更新时间 @SuppressWarnings("serial") @MappedSuperclass public class BaseModel implements Serializable{ @Temporal(TemporalType.TIMESTAMP) @Column(insertable=false, updatable=false) @CreationTimestamp protected Date createTime
今天配置实体类注解时,出现以下错误: Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: ss_user, for columns: [org.hibernate.mapping.Column(role_list)] 解决方案:注解要么写在字段上,要么写在getXX上,千万千万不能混合使用,否则会报这个错误!