主键生成策略
//程序控制生成主键之后直接连同主键添加数据进表
@GenericGenerator(name = "generator", strategy = "assigned") @Id @GeneratedValue(generator = "generator") @Column(name = "id", unique = true, nullable = false, length = 32)
2.
//zi自增长 integer类型id @Id @Column(name="id") @GeneratedValue(strategy=GenerationType.IDENTITY)
3.
//数据库自动生成主键 32位uuid @GenericGenerator(name = "generator", strategy = "uuid") @Id @GeneratedValue(generator = "generator") @Column(name = "id", unique = true, nullable = false, length = 32)
这个人很懒,什么也没下留。