package util;

import java.util.UUID;

public class UUIDUtil {
public static UUID getId(){
return UUID.randomUUID().toString();
}
public static void main(String[] args) {
System.out.println(UUID.randomUUID().toString().getBytes().length);
}
}

运行结果36

去掉-为32位

05-08 15:47