Java中获取位UUID工具类

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/YLiuwillbebetter/article/details/84065599

Java中获取位UUID工具类

public class UUIDUtils {
	
	/**
     * 主键生成器,未处理
     * 
     * @return 32位的UUID
     */
    public static String getUUID() {
        return UUID.randomUUID().toString();
    }
    
    /**
     * 主键生成器,已处理
     * 
     * @return 32位的UUID
     */
    public static String getUUIDDispose() {
        return UUIDUtils.getUUID().replace("-", "");
    }

}

猜你喜欢

转载自blog.csdn.net/YLiuwillbebetter/article/details/84065599