org.hibernate.id.UUIDHexGenera tor which does not generate IETF RFC 4122 compliant UUID values; cons
Posted 健身小白
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了org.hibernate.id.UUIDHexGenera tor which does not generate IETF RFC 4122 compliant UUID values; cons相关的知识,希望对你有一定的参考价值。
[erSimpleAppMain] org.hibern
ate.id.UUIDHexGenerator : HHH000409: Using org.hibernate.id.UUIDHexGenera
tor which does not generate IETF RFC 4122 compliant UUID values; consider using
org.hibernate.id.UUIDGenerator instead
jvm 1 | 2021-09-01 10:17:07.679 INFO 814408 — [erSimpleAppMain] j.LocalCon
tainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persis
tence unit ‘default’
Unable to get the current logfile size with ftell: 无法立即完成一个非阻止性套接
字操作。 (0x2733)
意思是它不能生成符合IETF RFC 4122标准的UUID值,请考虑使用org.hibernate.id.UUIDGenerator。
1 原先的写法
@Id
@GenericGenerator(name=“idGenerator”, strategy=“uuid”)
@GeneratedValue(generator=“idGenerator”)
private String id;
2 改为如下写法
@Id
@GenericGenerator(name=“uuid2”, strategy=“org.hibernate.id.UUIDGenerator”)
@GeneratedValue(generator=“uuid2”)
private String id;
以上是关于org.hibernate.id.UUIDHexGenera tor which does not generate IETF RFC 4122 compliant UUID values; cons的主要内容,如果未能解决你的问题,请参考以下文章