//设置表名
@Table(name = "tb_user")
//设置id
@Id
//设置为自增字段
@GeneratedValue(strategy = GenerationType.IDENTITY)
//将对象转为json时,不包含此字段,需要依赖jackson-annotations
@JsonIgnore
//设置字段名
@Column
//非数据库中字段
@Transient
//插入时返回id
@KeySql(useGeneratedKeys = true)
通用Mapper中的注解使用
猜你喜欢
转载自blog.csdn.net/u013421917/article/details/102853858
今日推荐
周排行