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



不处理无效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

原因在UUID生成器中,它正在生成

a98c543作为第一个块,有7位而不是8位,就像它们缺少前导零一样

最新更新