关于Hibernate的主键类型:uuid
升级到3.6.0后关于UUID的警告
原来的UUIDHexGenerator已不推荐使用,应用UUIDGenerator替代。
@GenericGenerator(name = "system-uuid", strategy = "uuid")
改为
@GenericGenerator(name = "system-uuid", strategy = "org.hibernate.id.UUIDGenerator")
//---------------------------------@Id@GeneratedValue(generator = "system-uuid") @GenericGenerator(name = "system-uuid", strategy = "org.hibernate.id.UUIDGenerator") //---------------------------------
//---------------------------------@GenericGenerator(name = "generator", strategy = "org.hibernate.id.UUIDGenerator")@Id@GeneratedValue(generator = "generator")//---------------------------------