mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
新增 简单获取Snowflake 的 nextId方法
This commit is contained in:
@@ -271,7 +271,7 @@ public class IdUtil {
|
|||||||
* @return nextId
|
* @return nextId
|
||||||
*/
|
*/
|
||||||
public static long getSnowflakeNextId() {
|
public static long getSnowflakeNextId() {
|
||||||
return getSnowflake(1, 1).nextId();
|
return getSnowflake().nextId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -281,7 +281,7 @@ public class IdUtil {
|
|||||||
* @return nextIdStr
|
* @return nextIdStr
|
||||||
*/
|
*/
|
||||||
public static String getSnowflakeNextIdStr() {
|
public static String getSnowflakeNextIdStr() {
|
||||||
return getSnowflake(1, 1).nextIdStr();
|
return getSnowflake().nextIdStr();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user