Package com.bytedesk.core.uid
Class UidUtils
java.lang.Object
com.bytedesk.core.uid.UidUtils
https://github.com/wujun234/uid-generator-spring-boot-starter/blob/master/README.md
UidGenerator接口提供了 UID 生成和解析的方法,提供了两种实现:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CachedUidGenerator
private DefaultUidGenerator
private static UidUtils
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
defaultUidGenerator
-
cachedUidGenerator
-
instance
-
-
Constructor Details
-
UidUtils
public UidUtils()
-
-
Method Details
-
init
@PostConstruct public void init() -
getInstance
-
getDefaultSerialUid
实时生成 性能有损耗- Returns:
- string
-
getCacheSerialUid
生成一次id之后,按序列号+1生成一批id,缓存,供之后请求 如对UID生成性能有要求, 请使用CachedUidGenerator- Returns:
- string
-
getUid
-