ID 生成器
生成32位随机ID
package com.longtop.components.util;
import java.util.UUID;
public class IdGenerateUtil {
public static String getUUIDString(){
String id = UUID.randomUUID().toString();
id = id.replace("-", "");
return id;
}
public static void main(String[] args) {
String uuid = IdGenerateUtil.getUUIDString();
System.out.println("size: " + uuid.length() + "bit -" + uuid);
}
}