未处理无效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
1条答案
按热度按时间vc9ivgsu1#
原因在UUID生成器中,它正在生成
a98c543
作为具有7位而不是8位的第一块,就像它们缺少前导零一样