1
2
3
4
5
6
7
8
// 需要引入import java.util.UUID包
public static String getUUID() {
UUID uuid = UUID.randomUUID();
String str = uuid.toString();
String uuidStr = str.replace("-", "");
return uuidStr;
}
Post
Cancel
生成随机id
This post is licensed under
CC BY 4.0
by the author.