Home 生成随机id
Post
Cancel

生成随机id

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;
}
This post is licensed under CC BY 4.0 by the author.