首页 > 其他分享 >使用tk.mybatis.mapper中的insertSelective返回实体类主键 注解配置

使用tk.mybatis.mapper中的insertSelective返回实体类主键 注解配置

时间:2023-02-02 20:00:44浏览次数:48  
标签:mapper 实体类 generator strategy insertSelective GenerationType 主键

@ApiModelProperty(value = "知识树ID    组织ID")
@Id
@Column(name = "`keynote_id`")
@GeneratedValue(strategy = GenerationType.IDENTITY,generator = "JDBC")
private Long keynoteId;

起作用的是这一行 @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "JDBC")

标签:mapper,实体类,generator,strategy,insertSelective,GenerationType,主键
From: https://www.cnblogs.com/onlyzhangmeng/p/17087249.html

相关文章