JPA常用注解记录

注解 作用
@Data lombok注解,与jpa无关,自动生成getter/setter/equals/hashcode/tostring等方法
@Entity, @Table jpa注解,表示这个类与db的表关联
@Id, @GeneratedValue 作用与自增主键
@Column 表明这个属性与表中的某列对应
@CreateDate 根据当前时间来生成默认的时间戳
原文地址:https://www.cnblogs.com/stilldream/p/13402012.html