json 不是有效文本表示,问题:UUID必须由标准

xzabzqsa  于 2022-12-01  发布在  其他
关注(0)|答案(1)|浏览(104)

未处理无效UUID并出现以下异常的原因是什么?

WARN  o.s.w.s.m.s.DefaultHandlerExceptionResolver - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Can not construct instance of java.util.UUID from String value 'a98c543-22de-4330-2995-ff81889aa412': not a valid textual representation, problem: UUID has to be represented by the standard 36-char representation; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of java.util.UUID from String value 'a98c543-22de-4330-2995-ff81889aa412': not a valid textual representation, problem: UUID has to be represented by the standard
vc9ivgsu

vc9ivgsu1#

原因在UUID生成器中,它正在生成
a98c543作为具有7位而不是8位的第一块,就像它们缺少前导零一样

相关问题