通用Mapper中的注解使用

//设置表名
@Table(name = "tb_user")
//设置id
@Id
//设置为自增字段
@GeneratedValue(strategy = GenerationType.IDENTITY)
//将对象转为json时,不包含此字段,需要依赖jackson-annotations
@JsonIgnore
//设置字段名
@Column
//非数据库中字段
@Transient
//插入时返回id
@KeySql(useGeneratedKeys = true)
发布了23 篇原创文章 · 获赞 0 · 访问量 1132

猜你喜欢

转载自blog.csdn.net/u013421917/article/details/102853858