摘要:
JPA标准方式下,不可以生成uuid类型的主键,但是hibernate提供了一些方式生成uuid主键,具体如下:1.主键生成器 @GeneratedValue(generator="idGenerator")2.通过注解方式生成一个generator @GenericGenerator(name="idGenerator", strategy="uuid")/** * annotation uuid * @author xueji */@Entitypublic class Teacher2 { private String id ; 阅读全文