Home  >  Article  >  Database  >  java生成自定义的表ID

java生成自定义的表ID

WBOY
WBOYOriginal
2016-06-07 15:59:081540browse

需生成如下ID: 56d7ade1-87d1-4f54-8dc8-13611c8c2545 27181ad4-4214-4e12-af3a-911a0103a12f 24cafdfb-eac3-4567-80c0-70d21d096b19 c92046a0-3d94-4d72-ba8f-cdac30ed69e8 1e607dde-eef6-49ac-a3b1-16ba1475d293 在java里可以这样使用: UUID uuid = UUID

需生成如下ID:

56d7ade1-87d1-4f54-8dc8-13611c8c2545
27181ad4-4214-4e12-af3a-911a0103a12f
24cafdfb-eac3-4567-80c0-70d21d096b19
c92046a0-3d94-4d72-ba8f-cdac30ed69e8
1e607dde-eef6-49ac-a3b1-16ba1475d293

在java里可以这样使用:

UUID uuid = UUID.randomUUID();


System.out.println(uuid.toString());

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn