首页 > 代码库 > Hiberante+jpa,注解生成32字符的Id

Hiberante+jpa,注解生成32字符的Id

@Id@GenericGenerator(name = "id-generator", strategy = "uuid")@GeneratedValue(generator = "id-generator",strategy = GenerationType.IDENTITY)private String id; 

  或者

@Id@GenericGenerator(name = "id-generator", strategy = "uuid")@GeneratedValue(generator = "id-generator",strategy = GenerationType.IDENTITY)private String id; 

 

Hiberante+jpa,注解生成32字符的Id