码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-11-21 16:06:21      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:style   blog   io   color   sp   java   on   div   log   

@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

标签:style   blog   io   color   sp   java   on   div   log   

原文地址:http://www.cnblogs.com/yuanfy008/p/4112890.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!